1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07: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/java-ts-mode.el (java-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 37a6c859b0
commit ed57faafc7
No known key found for this signature in database
GPG key ID: 56E19BC57664A442
17 changed files with 19 additions and 19 deletions

View file

@ -7147,7 +7147,7 @@ implementations: `python-mode' and `python-ts-mode'."
\\{python-ts-mode-map}"
:syntax-table python-mode-syntax-table
(when (treesit-ready-p 'python)
(treesit-parser-create 'python)
(setq treesit-primary-parser (treesit-parser-create 'python))
(setq-local treesit-font-lock-feature-list
'(( comment definition)
( keyword string type)