diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2023-02-05 15:46:28 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2023-02-05 15:50:16 +0200 |
commit | 0c125fcc67a47b933716124223404a45e73357c7 (patch) | |
tree | e2ebb0d44dd108f4efbc4b02dc3110c18e95f625 /lisp/progmodes/cmake-ts-mode.el | |
parent | 1dd751c3ac4e4276b461b83df7d9c4d002cf016e (diff) | |
download | emacs-0c125fcc67a47b933716124223404a45e73357c7.tar.gz emacs-0c125fcc67a47b933716124223404a45e73357c7.tar.bz2 emacs-0c125fcc67a47b933716124223404a45e73357c7.zip |
Make highlighting more regular across TS modes (bug#61205)
* doc/emacs/display.texi (Parser-based Font Lock):
Update description of treesit-font-lock-level, moving 'property' to
level 4.
* lisp/treesit.el (treesit-font-lock-level): Likewise, in docstring.
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Do that here.
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode): Add a comment.
* lisp/progmodes/go-ts-mode.el (go-ts-mode): Add 'definition' to
level 1. Move 'function', 'property' and 'variable' to level 4.
(go-ts-mode--font-lock-settings): Move a bunch of existing rules
to 'definition'. Add highlighting of function parameters.
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode)
(rust-ts-mode--font-lock-settings): Same. And also change "scoped
identifiers" highlights to only match capitalized names.
Diffstat (limited to 'lisp/progmodes/cmake-ts-mode.el')
-rw-r--r-- | lisp/progmodes/cmake-ts-mode.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index c241a2868e5..04f5d6bdac8 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -220,6 +220,9 @@ the subtrees." (setq-local treesit-font-lock-feature-list '((comment) (keyword string) + ;; 'function' and 'variable' here play slightly + ;; different roles than in other ts modes, so we + ;; kept them at level 3. (builtin constant escape-sequence function number variable) (bracket error misc-punctuation))) |