Closed ahelwer closed 6 months ago
I'd love to look into this, but there's not quite enough information to go on. Can you provide an example that reproduces the problem from the Tree-sitter CLI, or using Tree-sitter in any way that's not tied to Neovim?
I don't think it's a slow parsing issue or a tree-sitter issue - the file takes 5ms for an initial parse, and I believe it's a combination of using an older neovim version (nightly has great perf improvements) and some slow plugins that leverage nvim-treesitter, because I don't experience any lag in tlaplus's grammar.js
Ref https://github.com/nvim-treesitter/nvim-treesitter/issues/1313
If I open my tree-sitter-tlaplus grammar file in neovim, which uses this grammar, performance is extremely bad. It takes several seconds to input a single character. Here is the file https://github.com/tlaplus-community/tree-sitter-tlaplus/blob/main/grammar.js
Opening an issue here because I believe the issue is with the grammar itself and not neovim.