tree-sitter-typescript
tree-sitter-cpp
tree-sitter-typescript | tree-sitter-cpp | |
---|---|---|
11 | 8 | |
387 | 273 | |
4.1% | 2.9% | |
8.2 | 8.3 | |
22 days ago | 21 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tree-sitter-typescript
-
Mastering JSX Editing in Emacs with Tree-sitter
Now, let's dive into some practical editing functions implemented using Tree-sitter. Keep in mind that all the functions are specific to the tree-sitter-typescript parser and only work in the Emacs 29 built-in tsx-ts-mode.
- Let's write an Emacs treesitter major mode
-
How to make `goto_next_test` and `goto_prev_test` work?
I believe goto_next_test requires support from the tree-sitter parser, specifically tree-sitter-javascript in the case of JS and tree-sitter-typescript in the case of TS.
- Emacs and Java Development: Corfu + Cape + LSP-Mode + Treesit
- Building tree-sitter languages for Emacs
-
Is there an official language spec and/or lexical grammar for TS?
If you need to do efficient AST operations, have you considered treesitter? There is a typescript grammar available https://github.com/tree-sitter/tree-sitter-typescript
- tree-sitter-typescript: TypeScript grammar for tree-sitter
-
Really sick of the shoddy jsx/tsx handling....would anyone be willing to help me write a major-mode for it?
I am curious though, why did you write your own indentation tool? (It works super well btw, amazing work) I thought tree-sitter supported tsx (and found repos like this) so just wondering if you tried those and they didn't work so you wrote your own.
-
Treesitter : Proposal for more precise syntax highlighting
Please have a look at it - https://github.com/tree-sitter/tree-sitter-typescript/issues/177
-
Plugins to help writing a new tree-sitter parser?
You can see a much more in-depth version at https://github.com/tree-sitter/tree-sitter-typescript or https://github.com/tree-sitter/tree-sitter-rust
tree-sitter-cpp
-
Difftastic, a structural diff tool that understands syntax
Grammar page (https://github.com/tree-sitter/tree-sitter-cpp) reference two documents at the very end:
- Hyperlinked C++ BNF Grammar (https://alx71hub.github.io/hcb/)
- EBNF Syntax: C++ (ISO/IEC 14882:1998(E)) https://www.externsoft.ch/download/cpp-iso.html
The second doc has a year in the title, so it's ancient af.
- How to Get Started with Tree-Sitter
- Emacs and Java Development: Corfu + Cape + LSP-Mode + Treesit
-
GitHub code search is generally available
The feature isn't working well yet on C and C++. If I recall correctly it's based on Tree-Sitter[1] parsing, and there are still too many bugs in corresponding grammars - tree-sitter-c[2] and tree-sitter-cpp[3]. Hopefully, it will be greatly improved in the future as the share of the existing and newly written code in C and C++ is quite significant.
[1] https://tree-sitter.github.io/tree-sitter/
[2] https://github.com/tree-sitter/tree-sitter-c/issues
[3] https://github.com/tree-sitter/tree-sitter-cpp/issues
- Building tree-sitter languages for Emacs
-
Call for volunteers: add tree-sitter support to major modes
There's treesitter-cpp parser that works to some extent already. However, for complex language like c++, I think it would be better to use lsp's semantic highlighting instead
- Neovim C++ development
-
Difftastic: A syntactic diff tool
C++ is currently unsupported, but there's a good tree-sitter implementation I can add: https://github.com/tree-sitter/tree-sitter-cpp
What are some alternatives?
tree-sitter-haskell - Haskell grammar for tree-sitter.
difftastic - a structural diff that understands syntax 🟥🟩
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
nvim-cmp - A completion plugin for neovim coded in Lua.
swc - Rust-based platform for the Web
git-split-diffs - Syntax highlighted side-by-side diffs in your terminal
tsi.el - treesitter-based indendentation for emacs 28 and 27
nvim-dap - Debug Adapter Protocol client implementation for Neovim
vim-jsx-typescript - React JSX syntax highlighting for vim and Typescript
diffsitter - A tree-sitter based AST difftool to get meaningful semantic diffs
tree-sitter-c-sharp - C# Grammar for tree-sitter
null-ls.nvim - Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.