r/neovim•
RRethy

vim-illuminate v2: Full Lua rewrite with LSP/Tree-sitter/Regex support

Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching. Think nvim-cursorword, vim-cursorword, or nvim-cursorword, but better.

Repo: https://github.com/RRethy/vim-illuminate Min Neovim Version: v0.7.2

Migration Guide

Remove any vim-illuminate configuration from your init file, simply having the plugin installed will load it and start highlighting the buffers using one of LSP, Tree-sitter, or regex matching (in that order) depending on which is available.

If you don't care to use the latest and greatest, then add let g:Illuminate_useDeprecated = 1 (or vim.g.Illuminate_useDeprecated = 1 for Lua configs) to your init file and everything will continue to work the same as before.

If you have any require('illuminate').on_attach() lines in your config currently, you can remove them since it now finds the LSP dynamically. Leaving that line in your config is fine too, it'll just cause existing behaviour to be used instead.

More than just highlighting

You can now use <a-n> and <a-p> to jump around the references.

You can also use <a-i> as a textobject for the reference under the cursor.

Full configuration

See the Migration Guide

Posted Aug 19, 2022, 11:43 PM UTC

5724
Loading comments…