aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorYuan Fu2024-10-07 17:24:32 -0700
committerYuan Fu2024-10-07 17:24:32 -0700
commited57faafc74e0810b492841deccb3cdc77a258ff (patch)
tree9e47ea5e3739330045994d5787d042f7f1a1d036 /lisp/progmodes/python.el
parent37a6c859b04ef9f88c3f9751027d544100cf1d2c (diff)
downloademacs-ed57faafc74e0810b492841deccb3cdc77a258ff.tar.gz
emacs-ed57faafc74e0810b492841deccb3cdc77a258ff.zip
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.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 0001bdd21a9..e4b9fe2367d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -7147,7 +7147,7 @@ implementations: `python-mode' and `python-ts-mode'."
7147\\{python-ts-mode-map}" 7147\\{python-ts-mode-map}"
7148 :syntax-table python-mode-syntax-table 7148 :syntax-table python-mode-syntax-table
7149 (when (treesit-ready-p 'python) 7149 (when (treesit-ready-p 'python)
7150 (treesit-parser-create 'python) 7150 (setq treesit-primary-parser (treesit-parser-create 'python))
7151 (setq-local treesit-font-lock-feature-list 7151 (setq-local treesit-font-lock-feature-list
7152 '(( comment definition) 7152 '(( comment definition)
7153 ( keyword string type) 7153 ( keyword string type)