diff options
| author | Yuan Fu | 2024-04-19 00:18:03 -0700 |
|---|---|---|
| committer | Yuan Fu | 2024-04-19 19:05:16 -0700 |
| commit | f62c1b4cd00e5b2f1cdc94796cf55d006c3113eb (patch) | |
| tree | 89f02eea02225186e0a236138a77e673ffdde1d5 /java | |
| parent | 996b9576713f9d63ea7ff7e9630a15cb0a0214eb (diff) | |
| download | emacs-f62c1b4cd00e5b2f1cdc94796cf55d006c3113eb.tar.gz emacs-f62c1b4cd00e5b2f1cdc94796cf55d006c3113eb.zip | |
Tree-sitter: only update range and reparse for changed ranges
In the very beginning, there's bug#66732, to solve that bug, we added
treesit--pre-redisplay and treesit--syntax-propertize-notifier.
However, to fix bug#66732, we were updating ranges for the whole
buffer which makes Emacs extremely slow when there are a lot of local
parsers in a large buffer. Then to solve that we introduced a
workaround where we only update ranges in a fixed range around point.
This change fixes the original problem (bug#66732) without using that
workaround.
* lisp/treesit.el (treesit--font-lock-notifier):
(treesit--syntax-propertize-notifier): Remove functions
(treesit--pre-redisplay): Use the new function
treesit-parser-changed-ranges to get the changed ranges of the primary
parser, and only update ranges for those ranges. Plus do the work of
the removed function.
(treesit-major-mode-setup): Remove setup for the removed functions.
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions