diff options
| author | Yuan Fu | 2024-10-07 17:24:32 -0700 |
|---|---|---|
| committer | Yuan Fu | 2024-10-14 20:26:23 -0700 |
| commit | c436d4eff97b3919c9f8cdec504272d6f7ed393f (patch) | |
| tree | 1bc2c257f34dbf3a5ce3f901fb9b26f033764b4a /lisp/progmodes/python.el | |
| parent | 2a6f1527f6b3080c3879e6159424b824c86801a7 (diff) | |
| download | emacs-c436d4eff97b3919c9f8cdec504272d6f7ed393f.tar.gz emacs-c436d4eff97b3919c9f8cdec504272d6f7ed393f.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/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.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a75317b3b0e..6d57517cd25 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -7182,7 +7182,7 @@ implementations: `python-mode' and `python-ts-mode'." | |||
| 7182 | \\{python-ts-mode-map}" | 7182 | \\{python-ts-mode-map}" |
| 7183 | :syntax-table python-mode-syntax-table | 7183 | :syntax-table python-mode-syntax-table |
| 7184 | (when (treesit-ready-p 'python) | 7184 | (when (treesit-ready-p 'python) |
| 7185 | (treesit-parser-create 'python) | 7185 | (setq treesit-primary-parser (treesit-parser-create 'python)) |
| 7186 | (setq-local treesit-font-lock-feature-list | 7186 | (setq-local treesit-font-lock-feature-list |
| 7187 | '(( comment definition) | 7187 | '(( comment definition) |
| 7188 | ( keyword string type) | 7188 | ( keyword string type) |