Closed mystilleef closed 1 year ago
Here's a video showing the issue.
https://github.com/HiPhish/nvim-ts-rainbow2/assets/273399/baabf441-d1c2-49c4-aeb0-0770211a3531
How do you disable this plugin? Here are a couple of scenarios I have tried out:
TSDisableRainbow
after the buffer has been loaded the highlighting turns back on.TSDisableRainbow
before the buffer has been loaded
highlighting stash off.Here is a sample buffer:
x = [[[[[[[[]]]]]]]]
print(((x)))
If I insert another []
pair inside the list the highlighting turns on in the
second case. Note that there is no completion popup window, so this has nothing
to do with nvim-cmp.
I do know where the problem lies, but I cannot fix it. When the plugin attaches
to a new buffer a callback is registered for on_changedtree
(see :h LanguageTree:register_cbs()
). However, there is no way of removing the
callback again, and so the callback lingers on even after disabling rainbow
highlights. There is a destroy
method, but it does not actually do anything.
I can add a one-line little hack so the callback is aborted. This is not ideal since the callbacks will build up and consume memory, but at least it solves the visual problem.
I have pushed an update to master
which fixes the issue for me. Please report back if it works for you.
The latest update fixes the issue. Thanks!
I use TSDisableRainbow
. I turn off all colors in Insert
mode and reenable them in Normal
mode.
I am closing this issue.
Neovim version
master
Language affected
No response
Query
No response
Strategy
No response
Description