Closed Pegasust closed 1 year ago
Please share the file. And yes, the Nix injections are staggeringly expensive; there's little that can be done here without regressing on functionality until async parsing/timeouts are implemented in Neovim core.
It's a 4k LOC file ... It should be expected to have some slowdown. But not too slow for me though. I do have bash/python parser injected, only comment is not. So this once again turns into a comment parser slowing down stuffs
We should consider just removing that parser (or the default injections).
Apologies for not including the file.
For me (again, this might be an aarch64-darwin thing), typing a word takes a good 5 seconds so that was my main concern. Maybe a nvim slimming session is needed to see if there was anything in between that could have made this a lot worse.
Describe the highlighting problem
I'm working on
github:nix-community/poetry2nix/overrides/default.nix
and it's absurdly slow until I:TSDisable highlight nix
and resort to semantic highlighting (thanks oxalica). I'm pretty sure I have no other injections (not sure about highlighting) going on, and I can provide a profiling flamegraph that shows the slowness comes from highlight.lua and injection.Example snippet that causes the problem
The whole
github:nix-community/poetry2nix/overrides/default.nix
is a sample, I haven't had an issue with other big Nix files (yet)Tree-sitter parsing result
It's a 30k lines file and I couldn't figure out how to copy parsed language/injected language vtext, it's all Nix as far as I can manually audit overrides-ts.txt
Example screenshot
colorscheme:
catppuccin-frappe
For
:TSHighlightCapturesUnderCursor
, I think this is not applicable - the highlights are fine, this report focuses on performanceExpected behavior
Should be responsive and optionally fast
Output of
:checkhealth nvim-treesitter
Additional context