-
-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable injections for large files #6435
Comments
I don't think that's correct. After recent changes, it only runs injection queries for the viewport. |
Injections themselves are parsed lazily (neovim/neovim#22309, neovim/neovim#24647), but the queries are run if any region is invalidated according to task 4 in neovim/neovim#22426. |
I'm not sure the complexity is worth it. In any case, highlighting (and injections) are completely handled by Neovim; this project only coordinates queries (and provides a thin wrapper around |
neovim/neovim#26827 implements this. |
(was just about to edit my comment to point that out) |
Is your feature request related to a problem? Please describe.
Neovim runs injection queries for the entire buffer on each edit. For large files, a significant portion of the time is spent executing injection queries, even if the file doesn't contain any injections.
Describe the solution you'd like
I think something similar to the
highlight
'sdisable(lang, bufnr)
could be added, but for injections.Describe alternatives you've considered
Not running injection queries for the entire buffer. Though, I think it could break
combined injections
in some situationsAdditional context
The redraw time and injection query execution time:
init.lua
patch for measuring time for neovim commit 2c5fd3f966
The text was updated successfully, but these errors were encountered: