Open medwatt opened 2 years ago
There's a lot of activity in this thread.
@MDeiml are you able to provide a status update? Especially now https://github.com/neovim/neovim/pull/22309 is merged.
Sure!
The split parser I mentioned is implemented and used in neovim for quite some while. This helped a lot in other editors, bur neovim had some problem with injected languages which was improved in https://github.com/neovim/neovim/pull/22309 so I imagine that this helped quite a bit. Since then I improved the "block" parser out of the two to almost not use "conflicts". Conflicts are still what makes the "inline" parser quite slow.
Note that we also recently bumped the tree-sitter version in our official builds to include the vastly improved error handling; I suspect that this also helps quite a bit in this regard.
So a test on the latest nightly with one of the bad example files would be very much appreciated.
Why does Treesiter cause delays in input latency if it is supposed to be async?
It's not async; what made you think that?
(I realize this is marked off topic, sorry abt that ig)
Hm. I have been searching around for a while and saw posts from several years ago referencing it as a new async highlighting features specifically for neovim, to improve on vim's synchronous and slow highlighting.
I guess I was wrong! My next question would be why isn't it async ?!
Describe the bug
I noticed recently when editing a large markdown file that has more 1000 lines that the delay between keystrokes while typing becomes perceptible. This only happens when treesitter for markdown is enabled.
Here's a video demonstrating the difference in the typing experience between an empty file and a large file.
https://user-images.githubusercontent.com/17733465/167254657-808a0f73-219f-4531-b878-d4ea5d06c4d7.mp4
To Reproduce
Expected behavior
It is expected that there should be no lag when typing irrespective of the number of lines in the file.
Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
No response