1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Set treesit-primary-parser for tree-sitter modes

I debated whether to do this, since technically speaking it's
not needed for single-language modes.  But ultimately it's
better to be explicit and set a good example with builtin modes.

* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode):
* lisp/progmodes/csharp-mode.el (csharp-ts-mode):
* lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode):
* lisp/progmodes/go-ts-mode.el (go-ts-mode):
(go-mod-ts-mode):
* lisp/progmodes/heex-ts-mode.el (heex-ts-mode):
* lisp/progmodes/json-ts-mode.el (json-ts-mode):
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode):
* lisp/progmodes/python.el (python-ts-mode):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
* lisp/progmodes/sh-script.el:
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode):
(tsx-ts-mode):
* lisp/textmodes/css-mode.el (css-ts-mode):
* lisp/textmodes/html-ts-mode.el (html-ts-mode):
* lisp/textmodes/toml-ts-mode.el (toml-ts-mode):
* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Set
treesit-primary-parser.
This commit is contained in:
Yuan Fu 2024-10-07 17:24:32 -07:00
parent 2a6f1527f6
commit c436d4eff9
No known key found for this signature in database
GPG key ID: 56E19BC57664A442
16 changed files with 18 additions and 18 deletions

View file

@ -262,7 +262,7 @@
:syntax-table go-ts-mode--syntax-table
(when (treesit-ready-p 'go)
(treesit-parser-create 'go)
(setq treesit-primary-parser (treesit-parser-create 'go))
;; Comments.
(setq-local comment-start "// ")
@ -539,7 +539,7 @@ what the parent of the node would be if it were a node."
:syntax-table go-mod-ts-mode--syntax-table
(when (treesit-ready-p 'gomod)
(treesit-parser-create 'gomod)
(setq treesit-primary-parser (treesit-parser-create 'gomod))
;; Comments.
(setq-local comment-start "// ")