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.12k stars 44 forks source link

Is it possible to make backwards-compatible EnableIllumination optional? #108

Closed arizonatribe closed 1 year ago

arizonatribe commented 1 year ago

The IlluminationEnable command is also mapped to EnableIllumination for backwards-compatibility.

The issue I'm encountering is I can't use the quick shortcut :E to Vim's native :Explore command because of :EnableIllumination. For now, I'm just typing :Ex.

Is it possible to make this optional (perhaps if the user sets a variable) so that this command isn't created when vim-illuminate starts up?

RRethy commented 1 year ago

Add :delcommand EnableIlluminate in your init file.

RRethy commented 1 year ago

Actually sourcing order might be off.

arizonatribe commented 1 year ago

Actually sourcing order might be off.

Yes, good point. I couldn't invoke nvim_del_user_command() in my Neovim config. However I was able to get it to work this way:

vim.api.nvim_command('au VimEnter delcommand EnableIllumination')
RRethy commented 1 year ago

The change I pushed removes those commands so updating the plugin should make that command redundant.

arizonatribe commented 1 year ago

Awesome! Thanks so much for all the work you've put into this library. Really enjoying it