Add CursorLine highlight groups
Closed this issue · 4 comments
I use a background color on CursorLineNR
to make it easier to spot the cursor line. When my cursor is on a line with a mark, the mark's MarkSignNumHL
overrides the CursorLineNR
and makes it difficult for me to see where the cursor line is. To address this, it would be nice to have CursorLine
variants of this plugin's highlight groups:
CursorLineMarkSignHL
CursorLineMarkSignNumHL
CursorLineMarkVirtTextHL
I think the solution for this is to default MarkSignNumHL
to none, rather than introducing three new highlight groups. I've wanted to change the default link for a while now, its just no one has raised an issue until now.
Do you mean hi MarkSignNumHL none
instead of hi link MarkSignNumHL CursorLineNr
?
I would like to still have a MarkSignNumHL
, but I would like for CursorLineNr
to override it on the cursor line.
I tried using these highlight groups, but the MarkSignNumHL
group still causes the bgcolor of CursorLineNr
to be ignored even though the bgcolor of MarkSignNumHL
is NONE
:
hi MarkSignNumHL guifg=#FFF1E0 guibg=NONE
hi CursorLineNr guifg=#FFF1E0 guibg=#7583FF
I’m probably misunderstanding how highlight groups interact, but is this possible without a dedicated CursorLineMarkSignNumHL
group?
Unfortunately, what you want isn't actually possible in vim/neovim. From the help docs for sign_define
:
numhl: highlight group used for 'number' column at the
associated line. Overrides hl-LineNr,
hl-CursorLineNr.
So, you can only have one or the other: a sign number highlight, or a cursorline number highlight.
Ah I see, thanks for pointing that out. Maybe my request is best directed towards Neovim itself. I appreciate you looking into this for me!