]> git.eshelyaron.com Git - emacs.git/commit
Query on the root node in tree-sitter font-lock
authorYuan Fu <casouri@gmail.com>
Mon, 31 Oct 2022 22:27:40 +0000 (15:27 -0700)
committerYuan Fu <casouri@gmail.com>
Tue, 1 Nov 2022 19:54:51 +0000 (12:54 -0700)
commita3651d3237e91f788211e507d61c2dcf886c185f
treedacf9c8a7d580c572ccfa469ec7177caafa1c868
parent4ef50ccd3f8bc177ef6dd7183a9268bb8057f064
Query on the root node in tree-sitter font-lock

Rather than querying on the smallest node that spans START to END, we
query on the root node between START to END.

* lisp/progmodes/python.el (python--treesit-fontify-string): Accept
the string rather than the quote node.
(python--treesit-settings): Capture the string rather than the quote
node.
* lisp/treesit.el (treesit-font-lock-fontify-region): Query the root
node rather than the smallest node.
lisp/treesit.el