-
Injection tree is not incremental. This is a direct cause of 1, and is the biggest performance issue caused by TS in nvim now. The injection trees will be rebuilt and reparsed at every buffer change. Usually this will incredibly prolong the screen drawing time and block editing for a long time at every keystroke on large file, causing editor unusable.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
Bloated injection queries ships with nvim-treesitter. As a half-official TS support plugin in nvim, all-in-one also means bloating for normal users. See injection query for javascript in nvim-treesitter for example. Usually users are not in high demand of them in normal programming language (unlike markdown), but they will pay the extreme high performance cost for this feature.
-
The following discussion here. TS query cannot be incremental, that is why I regard it as design fault.
-
True, However (as someone who doesn't have any experience with tree-sitter) the commits adding incremental injection parsing look quite obtruse: https://github.com/helix-editor/helix/compare/6728e44..4080341
-
I wonder if a plugin integrating syntect would be possible.
-
you mean this one? https://github.com/stsewd/tree-sitter-comment
-
I also found that using https://github.com/wolfpld/tracy with tree-sitter functions marked in Neovim that some individual queries and parse operation would have significant perf impact while other do not and that there are some parsers who tend to not really support incremental parsing but often need to throw away from cursor position until file end on certain character. We would need more infrastructure and built-in profiling to detect problems in certain languages earlier.