Closed liangkarl closed 5 months ago
I can not reproduce with just the information from the issue.
Having equivalent of m.highlight("MiniCursorword", { fg = 'tomato', ctermfg = 'Red' })
and m.highlight("MiniCursorwordCurrent", { fg = 'tomato', ctermfg = 'Red' })
is enough for me to show cursorwords in red color.
My first guess is that those highlight groups are changed by the color scheme, which is later loaded.
This is how you can verify where the highlight group was defined:
nvim -V1
to have a more debug information present during running.:verbose hi MiniCursorword
to see where that highlight group was defined.Side note: vim.api.nvim_set_hl()
takes not a buffer id as first argument, but a namespace id (created with vim.api.nvim_create_namespace()
) or 0 for a "global namespace".
Contributing guidelines
Module(s)
mini.cursorword
Description
Following the
mini.cursorword
manual,:hi! MiniCursorwordCurrent guifg=NONE guibg=NONE gui=NONE cterm=NONE
I have append below highlight command converted into
lua
in my init.lua file.However, it doesn't work. it seems like the default mini.cursorword configuration that is written in autocmd event colorscheme always overrides my configs, even I place them in the last line of my init.lua. I could not find a better way to fix this except modify plugin itself. Could anyone give me a hand? Thanks!
Neovim version
0.9.5
Steps to reproduce
:highlight
to change color in init.luanvim
Expected behavior
The cursorword color should be changed after I write the setting into the init.lua
Actual behavior
The cursorword color didn't change