]> git.eshelyaron.com Git - emacs.git/commit
Allow major modes to tweak tree-sitter fontification
authorYuan Fu <casouri@gmail.com>
Mon, 21 Nov 2022 19:26:46 +0000 (11:26 -0800)
committerYuan Fu <casouri@gmail.com>
Mon, 21 Nov 2022 19:26:46 +0000 (11:26 -0800)
commit6cf8bf504285d9b8caf10ebdb3d5b61671a533ef
treebf9b6ba23b71a3ae9af9f3a1edfeb0bb095e4d56
parent0cbb7d3bd098e80b58457cb58125cc67e56415a2
Allow major modes to tweak tree-sitter fontification

treesit--font-lock-query-expand-range allows a major mode to fix
fontification problems temporarily before the parser can be fixed.

* lisp/treesit.el (treesit--font-lock-query-expand-range): New variable.
(treesit-font-lock-fontify-region): Use the new variable.
* lisp/textmodes/css-mode.el (css-ts-mode): Use the new variable.
lisp/textmodes/css-mode.el
lisp/treesit.el