-
-
Notifications
You must be signed in to change notification settings - Fork 35
Neovim 0.9.1 hangs consuming 100% CPU #45
Comments
Which file type does this happen with? Can you provide a sample text? BTW, you can remove |
I am using Astronvim with Lazy package manager, I added rainbow without any configuration like this: return {
"nvim-treesitter/nvim-treesitter",
dependencies = {
"HiPhish/nvim-ts-rainbow2",
},
opts = {
rainbow = {
enable = true,
},
},
} Noticed some weird hangs when I edited some typescript, but they appeared rarely and I didn't do anything to solve them. Neovim version is v0.10.0-dev (neovim-nightly from AUR); Lazy fetched e1783c8 commit of rainbow. UPD: this fork https://github.com/mrjones2014/nvim-ts-rainbow works for me |
It doesn't hang for me but I see a noticeable slowdown. Also when I comment a block with comment.nvim or mini.comment, it takes 10 seconds. Uninstalling this plugin resolves the issue but also I think it's upstream neovim treesitter problem |
@KTheRD Zig is a problem in general, see #43 for my findings. It is the query file itself that causes Neovim to hang for a bit every time you open your first Zig file. Even when using the no-op strategy ( The fork you have linked works differently, it has very naive queries. These cause more problems than they solve, it is impossible to reliably determine the level of nesting for every file type and every strategy. But I guess if it works for you, then good for you. |
@kiyoon Can you please provide a file where this happens? I tried comment.nvim and commenting out a block was instantaneous. Do you have any other Tree-sitter modules enabled as well? |
@HiPhish If you're interested, I reported the summary of finding here |
I would still like a sample file so I can try to replicate the problem. It could very well be on my side because after every change to the tree I have to re-compute the tree structure of delimiters. One thing you can try is to set the strategy to the no-op strategy ( rainbow = {
enable = true,
strategy = {
rainbow.strategy.noop,
},
}, |
This plugin is now deprecated because of upcoming changes to nvim-treesitter. The new rainbow plugin is here: rainbow-delimiters.nvim (GitHub mirror). Please file an issue over there if the problem still persists. |
REF: <HiPhish/nvim-ts-rainbow2#45 (comment)> Signed-off-by: Gaoyang Zhang <[email protected]>
Describe the bug
Since upgrading to neovim 0.9.1, I get random hangs where neovim hangs and consumes 100% CPU on one core for seconds before recovering.
I tried enabling and disabling plugins to find the culprit and it seems to be nvim-ts-rainbow2.
Steps to reproduce
I don't know yet how to trigger the issue, but it happened several times today (I upgraded neovim yesterday night).
Expected behavior
No hangs.
Config
The text was updated successfully, but these errors were encountered: