RRethy / vim-illuminate

illuminate.vim - (Neo)Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.
2.14k stars 47 forks source link

Option to disable in visual mode #81

Closed igormorgado closed 1 year ago

igormorgado commented 2 years ago

Is possible to disable vim-illuminate while in visual mode and visual-block mode?

RRethy commented 2 years ago

AFAIK there's no way to react to changing modes, the other option would be adding checks for the mode in callbacks from CursorMoved but this has some pretty obvious bugs, thus I don't think this is doable.

atusy commented 2 years ago

FYI: ModeChanged event helped me.

https://vimhelp.org/autocmd.txt.html#ModeChanged