Closed accessvector closed 2 years ago
You might need to update your highlight groups to use IlluminatedWordText
, IlluminatedWordRead
, and IlluminatedWordWrite
(they should be showing underline by default). I added a new command to help debug this, try running :IlluminateDebug
and paste the output here.
Also fwiw these lines aren't needed in Neovim:
set nocompatible
filetype off
filetype plugin indent on
Great, using the new highlight groups worked - thank you!
That's weird 🤔 these groups have defaults, maybe your colorscheme is being loaded after the plugins and it's calling hi clear
. Anyways, glad the fix was small.
With the rewrite you might also want to check the migration guide, https://github.com/RRethy/vim-illuminate/issues/111. There's some new functionality:
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.
That's weird 🤔 these groups have defaults, maybe your colorscheme is being loaded after the plugins and it's calling
hi clear
. Anyways, glad the fix was small.
This was the case for me. I changed my plugin load order so that vim-illuminate came after my colorscheme. Then my vim.api.nvim_set_hl
settings worked as expected (see below).
require("illuminate").configure({
providers = {
"regex",
},
delay = 50,
filetype_overrides = {},
filetypes_denylist = { "NvimTree", "alpha", "packer", "qf", "Outline", "fugitive" },
filetypes_allowlist = {},
modes_denylist = {},
modes_allowlist = {},
providers_regex_syntax_denylist = {},
providers_regex_syntax_allowlist = {},
under_cursor = false,
})
vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" })
vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" })
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" })
I noticed a recent
PlugUpdate
seemed to stop vim-illuminate working (no error messages though). Walking back through the commits, it seems to have been introduced by the lua rewrite (09235da12cfdad2a4f695610a079b20f1b263b4a).Testing with a minimal config:
When editing files (tested with
nvim -u illuminate.vimrc
), the word-under-cursor is no longer being highlighted. No errors are reported.Doing a
git checkout 09235da12cfdad2a4f695610a079b20f1b263b4a^
for the repo fixes things.Reproduced across multiple macOS machines. This one is running:
With latest macOS:
Thanks for making and maintaining this plugin - it's one I rely on a lot for my day-to-day work.