Variable: treesit-font-lock-level
treesit-font-lock-level is a customizable variable defined in
treesit.el.gz.
Value
3
Documentation
Decoration level to be used by tree-sitter fontifications.
Major modes categorize their fontification features into levels, from 1 which is the absolute minimum, to 4 that yields the maximum fontifications.
Level 1 usually contains only comments and definitions. Level 2 usually adds keywords, strings, data types, etc. Level 3 usually represents full-blown fontifications, including assignments, constants, numbers and literals, etc. Level 4 adds everything else that can be fontified: delimiters, operators, brackets, punctuation, all functions, properties, variables, etc.
In addition to the decoration level, individual features can be
turned on/off by calling treesit-font-lock-recompute-features.
Changing the decoration level requires calling
treesit-font-lock-recompute-features to have an effect, unless
done via customize-variable.
To see which syntactical categories are fontified by each level
in a particular major mode, examine the buffer-local value of the
variable treesit-font-lock-feature-list.
This variable was added, or its default value changed, in Emacs 29.1.
Source Code
;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defcustom treesit-font-lock-level 3
"Decoration level to be used by tree-sitter fontifications.
Major modes categorize their fontification features into levels,
from 1 which is the absolute minimum, to 4 that yields the maximum
fontifications.
Level 1 usually contains only comments and definitions.
Level 2 usually adds keywords, strings, data types, etc.
Level 3 usually represents full-blown fontifications, including
assignments, constants, numbers and literals, etc.
Level 4 adds everything else that can be fontified: delimiters,
operators, brackets, punctuation, all functions, properties,
variables, etc.
In addition to the decoration level, individual features can be
turned on/off by calling `treesit-font-lock-recompute-features'.
Changing the decoration level requires calling
`treesit-font-lock-recompute-features' to have an effect, unless
done via `customize-variable'.
To see which syntactical categories are fontified by each level
in a particular major mode, examine the buffer-local value of the
variable `treesit-font-lock-feature-list'."
:type 'integer
:set #'treesit--font-lock-level-setter
:version "29.1")