vim-scriptease
tree-sitter-typescript
Our great sponsors
vim-scriptease | tree-sitter-typescript | |
---|---|---|
7 | 10 | |
670 | 311 | |
- | 6.1% | |
3.2 | 6.7 | |
6 months ago | 12 days ago | |
Vim Script | JavaScript | |
- | 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.
vim-scriptease
-
How do you read long messages in :messages
I use tpope/vim-scriptease's :Messages instead.
-
highlight command in init,lua
Another great tool is the Scriptnames command from the vim-scriptease plugin. It dumps the output of :scriptnames into the quickfix list, letting you open all the files vim is reading to help with troubleshooting.
-
Help Fixing Plugin ( Syntax Plugin ) + RegEx
And the tpope extension comes in handy: https://github.com/tpope/vim-scriptease
- Plugin developers, how do you manage your repos?
-
How I made my First Successful Vim Plugin
As you continue your journey into vim plugin dev, I'd recommend vim-lookup and vim-scriptease.
-
vim-visualrun: select some lines and run them as a Vim command
This seems related to the g= mapping from vim-scriptease. I personally also have the following two mappings defined in ftplugin/vim.vim:
-
Visual calculator function
FYI, tpope/vim-scriptease provides this bound as an operator g=. You may want to read that implementation to see what you can learn more advanced techniques for writing vimscript. With the operator, you can g=W to convert the WORD to a solved expression.
tree-sitter-typescript
- 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
(use-package treesit :ensure nil :custom ;; Some stuff taken from here: https://robbmann.io/posts/emacs-treesit-auto/ (treesit-extra-load-path '("/usr/lib64/")) (treesit-language-source-alist '((bash . ("https://github.com/tree-sitter/tree-sitter-bash")) (c . ("https://github.com/tree-sitter/tree-sitter-c")) (c++ . ("https://github.com/tree-sitter/tree-sitter-cpp")) (csharp . ("https://github.com/tree-sitter/tree-sitter-c-sharp")) (css . ("https://github.com/tree-sitter/tree-sitter-css")) (elixir ("https://github.com/elixir-lang/tree-sitter-elixir")) (html . ("https://github.com/tree-sitter/tree-sitter-html")) (java . ("https://github.com/tree-sitter/tree-sitter-java")) (javascript . ("https://github.com/tree-sitter/tree-sitter-javascript")) (json . ("https://github.com/tree-sitter/tree-sitter-json")) (lua . ("https://github.com/Azganoth/tree-sitter-lua")) (makefile . ("https://github.com/alemuller/tree-sitter-make")) (org . ("https://github.com/milisims/tree-sitter-org")) (python . ("https://github.com/tree-sitter/tree-sitter-python")) (tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")) (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")) (ruby . ("https://github.com/tree-sitter/tree-sitter-ruby")) (rust . ("https://github.com/tree-sitter/tree-sitter-rust")) (sql . ("https://github.com/m-novikov/tree-sitter-sql")) (toml . ("https://github.com/tree-sitter/tree-sitter-toml")) (yaml . ("https://github.com/ikatyang/tree-sitter-yaml")))) (major-mode-remap-alist '((c-mode . c-ts-mode) (c++-mode . c++-ts-mode) (csharp-mode . csharp-ts-mode) (css-mode . css-ts-mode) (html-mode . html-ts-mode) (java-mode . java-ts-mode) (js-mode . js-ts-mode) (json-mode . json-ts-mode) (makefile-mode . makefile-ts-mode) ;; (org-mode . org-ts-mode) ;; not mature yet (python-mode . python-ts-mode) (typescript-mode . typescript-ts-mode) (ruby-mode . ruby-ts-mode) (rust-mode . rust-ts-mode) (toml-mode . toml-ts-mode) (yaml-mode . yaml-ts-mode))) (treesit-auto-fallback-alist '((toml-ts-mode . conf-toml-mode) (typescript-ts-mode . nil) (tsx-ts-mode . nil))) (treesit-font-lock-settings t) (treesit-simple-indent t) (treesit-defun-type-regexp t)) (use-package treesit-auto :demand t :config (setq treesit-auto-install t) (global-treesit-auto-mode))
- 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
-
Help Fixing Plugin ( Syntax Plugin ) + RegEx
https://github.com/nvim-treesitter/nvim-treesitter https://github.com/tree-sitter/tree-sitter-typescript
What are some alternatives?
conjure - Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)
tree-sitter-haskell - Haskell grammar for tree-sitter.
aniseed - Neovim configuration and plugins in Fennel (Lisp compiled to Lua)
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
vimspector - vimspector - A multi-language debugging system for Vim
swc - Rust-based platform for the Web
vim-lookup - Jump to the definition of variables or functions in VimL code.
tsi.el - treesitter-based indendentation for emacs 28 and 27
vim-enmasse - Edit every line in a quickfix list at the same time
vim-jsx-typescript - React JSX syntax highlighting for vim and Typescript
tree-sitter-c-sharp - C# Grammar for tree-sitter