mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -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:
parent
2a6f1527f6
commit
c436d4eff9
16 changed files with 18 additions and 18 deletions
|
|
@ -128,7 +128,7 @@ Return nil if there is no name or if NODE is not a defun node."
|
|||
(unless (treesit-ready-p 'json)
|
||||
(error "Tree-sitter for JSON isn't available"))
|
||||
|
||||
(treesit-parser-create 'json)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'json))
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "// ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue