base16-vim
base16-vim copied to clipboard
[Bug report] Error highlights are unreadable under cursorline
The issue described in #23 still exists since the PR seems to have been reverted. The foreground colour of error highlights makes the text nearly indistinguishable from the cursor line highlight bg colour.
Does setting :set termguicolors
help?
That doesn't have any effect as far as I can tell.
Can you give a minimal vimrc to reproduce?
Oh, was this resolved? I'm currently using a fork to resolve it.
Can you give a minimal vimrc to reproduce?
Sorry I missed this, if this is why this was closed I believe it's literally just set cursorline
- what's unknown here? The PR to fix it was reverted due to unspecified breakage, but the original issue appears to be pretty self-evident:
- non-gui error highlights are set up as fg=base00(default background) bg=base08(deleted/red)
-
set cursorline
applies bg=base01(lighter background) to the current line
So by design, you get text with a foreground of base00 (black) and a background of base01 (slightly less black) - which isn't really a valid combination of base16 colours. I'm not sure whether vim has a concept of highlighter "priorities", but the issue appears to be that CursorLine
takes precedence over ErrorHighlight
. I found some relevant discussion though, if it helps. Presumably a few options for a solution are to use reverse
again as the original PR attempted to do, or to use a foreground colour for ErrorHighlight
that wouldn't be invalid and unreadable when mixed with other contexts.
The breakage comes from, that the template is currently set up in a way that thereverse
option also applies for gui colors.
If you want to to upstream there are two options:
- Change the template in a way, that it is possible to set
cterm=reverse
without settinggui=reverse
- Solve the conflict only by setting
ctermfg
andctermbg
variables.