tree-sitter-typescript
tree-sitter-module


tree-sitter-typescript | tree-sitter-module | |
---|---|---|
12 | 10 | |
402 | 177 | |
2.5% | 1.1% | |
8.0 | 6.7 | |
14 days ago | 4 months ago | |
JavaScript | Shell | |
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
-
Swc4j: SWC for Java
HTH
0 - https://tree-sitter.github.io/tree-sitter/
1 - https://github.com/tree-sitter/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
tree-sitter-module
-
Let's write an Emacs treesitter major mode
BTW:
While Emacs 29.1 comes with "treesitter" built-in, you still need to manually build and install any treesitter language plugin implementing the actual language specific parser. This can be fiddly and frustrating doing it yourself.
I had a quick success with using this convenience script: https://github.com/casouri/tree-sitter-module/. It provides fully-automated builds for the most popular languages (including typescript, c and c++).
This is how it works for "typescript":
1. Clone the repository: https://github.com/casouri/tree-sitter-module/
2. Install "build-essentials" (providing a c/c++ compiler if you're on Linux).
3. run "./build typescript" from within the repo
4. Copy the resulting shared library from "dist/libtree-sitter-typescript.so" into your "~/.emacs.d/tree-sitter/".
5. Open a random typescript file and try "M-x typescript-ts-mode" which should not give you any error but instead nice syntax highlighting.
You might find there is a treesitter plugin for your language available and it is even supported by "tree-sitter-module" but there is still no major mode, yet. Happened to me for Perl 5.
-
Mastering Emacs: What's new in Emacs 29.1
I will look into building my own tree sitter grammars using https://github.com/casouri/tree-sitter-module as you suggest.
Some time ago I followed this guide https://vxlabs.com/2022/06/12/typescript-development-with-em...
- Getting Emacs 29 to Automatically Use Tree-sitter Modes · robbmann
- tree-sitter-module: Building script for tree-sitter language definitions
-
Emacs 29: Install Tree-Sitter parser modules with a minor mode
Also this https://github.com/casouri/tree-sitter-module/issues/13
-
Do I still need to install tree-sitter manually, for native tree-sitter in emacs29 to work?
I've downloaded and generated the libraries for the various languages from: https://github.com/casouri/tree-sitter-module
-
Setup Eglot in Emacs29 to recognize Python virtualenv
Third, I'm using tsitter in emacs29. I have https://github.com/casouri/tree-sitter-module installed as a sub-module in ~/.config/emacs, and have a symlink called tree-sitter to ./tree-sitter-module/dist (built by ./tree-sitter-module/batch.sh) . I'm mentioning the tsitter config here since I'm using python-ts-mode which is tree-sitter aware.
-
Is anyone working on a ruby tree sitter mode?
I'd recommend checking out https://github.com/casouri/tree-sitter-module for building the native treesit libraries that are required to enable the various languages.
-
How to use Emacs 29 Tree-sitter?
The author of the built-in tree-sitter implementation has published this repo with a build script to help you build various grammars: https://github.com/casouri/tree-sitter-module
What are some alternatives?
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
tree-sitter-c-sharp - C# Grammar for tree-sitter
tree-sitter-haskell - Haskell grammar for tree-sitter.
git-sim - Visually simulate Git operations in your own repos with a single terminal command.
tree-sitter-python - Python grammar for tree-sitter
tree-sitter-langs - Language bundle for Emacs's tree-sitter package
swc - Rust-based platform for the Web
treesit-auto - Automatic installation, usage, and fallback for tree-sitter major modes in Emacs 29
vim-scriptease - scriptease.vim: A Vim plugin for Vim plugins
typescript-lan
vim-jsx-typescript - React JSX syntax highlighting for vim and Typescript
org-alert - System notifications of org agenda items

