mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-04 15:03:42 -05:00
feat!(javascript): add treesit support
BREAKING CHANGE: This commit removes a number of core packages and features from this module and only replaces a handful of them, so that we can lean more on LSP and tree-sitter. To be specific: - We used to rely on `rjsx-mode` (derived from js2-mode) for total JS/JSX support (though imperfect; Emacs was starved for options at the time). This has now been replaced with `js-ts-mode` (built-in after Emacs 29), falling back to `js-mode` (very rudimentary, but a decent fallback). - This also meant the removal of `js2-mode`, which `skewer-mode`, `js2-refactor`, and `xref-js2` depended on, so those were removed too, and have *somewhat* been replaced with LSP integration (offers jump-to-definition/references and *some* refactoring actions, but no replacement for skewer's functionality). - Typescript support no longer relies on the jury-rigged, web-mode-derived major mode (because TSX support in the upstream `typescript-mode` isn't great). We now use `typescript-ts-mode` (built-in into Emacs 29.1+), falling back to `typescript-mode`. - JSX/TSX support now *requires* tree-sitter (and Emacs 29.1+), where `tsx-ts-mode` is available and outshines all the alternatives (at the time of writing). Due to the absolute chaos that is webdev, this module sacrifices some of the graceful-degradation I've implemented for other modules and creates a hard requirement on tree-sitter and Emacs 29.1+ for JSX/TSX. It still tries to degrade gracefully for plain JS and TS, but the module's doctor and docs will actively recommend tree-sitter. Close: #5278 Fix: #6172 Fix: #7042 Close: #8447 Co-authored-by: ribaricplusplus <ribaricplusplus@users.noreply.github.com>
This commit is contained in:
@@ -74,7 +74,6 @@
|
||||
(bibtex "https://github.com/latex-lsp/tree-sitter-bibtex" nil nil nil nil)
|
||||
(blueprint "https://github.com/huanie/tree-sitter-blueprint" nil nil nil nil)
|
||||
(commonlisp "https://github.com/tree-sitter-grammars/tree-sitter-commonlisp" nil nil nil nil)
|
||||
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src" nil nil)
|
||||
(latex "https://github.com/latex-lsp/tree-sitter-latex" nil nil nil nil)
|
||||
(make "https://github.com/tree-sitter-grammars/tree-sitter-make" nil nil nil nil)
|
||||
(nu "https://github.com/nushell/tree-sitter-nu" nil nil nil nil)
|
||||
@@ -85,8 +84,6 @@
|
||||
(sql "https://github.com/DerekStride/tree-sitter-sql" "gh-pages" nil nil nil)
|
||||
(surface "https://github.com/connorlay/tree-sitter-surface" nil nil nil nil)
|
||||
(toml "https://github.com/tree-sitter/tree-sitter-toml" nil nil nil nil)
|
||||
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src" nil nil)
|
||||
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src" nil nil)
|
||||
(typst "https://github.com/uben0/tree-sitter-typst" "master" "src" nil nil)
|
||||
(verilog "https://github.com/gmlarumbe/tree-sitter-verilog" nil nil nil nil)
|
||||
(vhdl "https://github.com/alemuller/tree-sitter-vhdl" nil nil nil nil)
|
||||
|
Reference in New Issue
Block a user