tree-sitter-javascript
.emacs.d
tree-sitter-javascript | .emacs.d | |
---|---|---|
6 | 26 | |
311 | 109 | |
2.3% | - | |
8.2 | 8.5 | |
4 days ago | 2 months ago | |
JavaScript | Emacs Lisp | |
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-javascript
-
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
-
RMS – EmacsConf Talk
Here is the tree-sitter grammar of Elisp:
https://github.com/Wilfred/tree-sitter-elisp/blob/main/gramm... (approx. 200 lines)
and here is the grammar of JavaScript:
https://github.com/tree-sitter/tree-sitter-javascript/blob/m... (approx. 1200 lines)
JavaScript evolved into a language of similar complexity as Perl 5 (the corresponding tree sitter syntax table counts almost 2000 lines, currently).
-
How to use Emacs 29 Tree-sitter?
Next, clone the Javascript grammar for tree-sitter from https://github.com/tree-sitter/tree-sitter-javascript and compile it with cc -shared -fPIC -g -O2 -I src src/scanner.c src/parser.c -o ~/.emacs.d/tree-sitter/libtree-sitter-javascript.dylib.
-
Trying to implement language injection for template literals: CSS inside of ` `
I downloaded the tree-sitter-javascript repo, created a folder for a custom grammar package, and created a basic package.json file, but I have no clue what the Atom page is talking about regarding call_expression, and the addInjectionPoint code. ELI5?
.emacs.d
-
If you like Straight, you should try Elpaca
The second one is a little bit more complicated. For a number of packages I kind of abuse use-package/straight to separate out setup of different files/modes contained within the same package into their own use-package statement. Good example of this is my setup for helm. ) For example, after the normal (use-package helm …) statement, I have the below which configures helm-files related stuff, which comes from helm-for-files.el within the helm package:
-
Tmux sessions-like package for Emacs?
siren-tab-bar.el
-
New package yank-indent automatically sets correct indentation on yanked/pasted text
If anyone is curious of the hacky solution I used to have in my config, here is the comment where I initially replaced it with an earlier version of yank-indent.
-
Doom -> vanilla emacs 29
I’d like to throw my personal vanilla config into the hat as a point of reference/starting point/inspiration: https://github.com/jimeh/.emacs.d
-
We’ve all been there, right? …right?
Oldest commit: Aug 27, 2011
-
Emacs bankruptcy
My config uses/has use-package, straight.el, lsp, company, magit, tree-sitter, doom-themes, doom-modeline, vertico, marginalia, consult, treemacs, undo-fu, GitHub Copilot, projectile, vterm, smartparens, yasnippet, diff-hl, and more.
-
How to use Emacs 29 Tree-sitter?
I did a similar thing with yaml-mode highlight queries in my config before the highlights were merged in. You can see the relevant commit in my config here: https://github.com/jimeh/.emacs.d/commit/ebbdab36fb2a3d635d591cc3179b8f4ed9a476d0
-
How Can I Start the Daunting Task of Making my Own Config?
I'm two months in (without any programming experience) and I've gone through various re-writes (from a literate .org init to a modular setup akin to Emacs Prelude or Siren configurations. (See: https://github.com/jimeh/.emacs.d)
- jimeh's personal Emacs config
- .emacs.d/siren-ruby.el at 06bf89af61413aaf610e7a293306c01e330f3302 · jimeh/.emacs.d · GitHub
What are some alternatives?
styled-jsx - Full CSS support for JSX without compromises
projectile - Project Interaction Library for Emacs
tree-sitter-c-sharp - C# Grammar for tree-sitter
dogears.el - Never lose your place in Emacs again
tree-sitter-typescript - TypeScript grammar for tree-sitter
tree-sitter-make
diff-hl - Emacs package for highlighting uncommitted changes
tree-sitter-ocaml - OCaml grammar for tree-sitter
gumshoe
tree-sitter-python - Python grammar for tree-sitter
doom - Doom Emacs config