diff options
| author | Yuan Fu | 2022-10-13 14:44:42 -0700 |
|---|---|---|
| committer | Yuan Fu | 2022-10-13 14:44:42 -0700 |
| commit | af288d813b3c31a528ddcbdce08f497855a56e94 (patch) | |
| tree | 3dd300e76e0d249b99812d385e18873f34d1088a /src | |
| parent | f0e9085a17be8866c123b120e3252c52845ec38e (diff) | |
| download | emacs-af288d813b3c31a528ddcbdce08f497855a56e94.tar.gz emacs-af288d813b3c31a528ddcbdce08f497855a56e94.zip | |
Rework tree-sitter font-lock
Remove :toggle and :level, add :feature.
* lisp/progmodes/js.el (js--treesit-settings): Add :feature.
(js--treesit-enable): Set treesit-font-lock-feature-list.
* lisp/progmodes/python.el: Replace :level with :feature.
(python-mode): Set treesit-font-lock-feature-list.
* lisp/treesit.el (treesit-font-lock-feature-list): New variable.
(treesit-font-lock-settings): Change format.
(treesit-font-lock-rules): Remove :toggle and :level, add :feature.
(treesit-font-lock-recompute-features): New function.
(treesit-font-lock-fontify-region): Change to work with the new
format.
(treesit-font-lock-enable): Add call to
treesit-font-lock-recompute-features. And improve the font-lock-mode
workaround.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions