Closed rnevius closed 3 years ago
This colorscheme is pretty much a lua port of rakr/vim-one which is were this behavior comes from. joshdick/onedark.vim sets the IncSearch
background to the same as the comments. How does IncSearch look when you set the background color to #a0a1a7
?
This colorscheme is pretty much a lua port of rakr/vim-one which is were this behavior comes from
I moved to Th3Whit3Wolf/one-nvim from rakr/vim-one, and the latter definitely doesn't have this issue. Here's what happens when I do the same search as in the original issue, while using vim-one
:
As expected, the search result is clearly incrementally highlighted.
More specifically, the highlight groups for Search
and IncSearch
are as follows when using the light background variant:
Th3Whit3Wolf/one-nvim | rakr/vim-one | |
---|---|---|
Search |
ctermbg=11 guifg=#fafafa guibg=#c18401 | ctermfg=255 ctermbg=136 guifg=#fafafa guibg=#c18401 |
IncSearch |
cterm=reverse guifg=#986801 | cterm=reverse ctermfg=94 gui=reverse guifg=#986801 |
The same issue also appears in the dark background version.
Neither should be setting reverse style for cterm or gui. It looks like your cterm colors aren't being set correctly either based on your table.
When you get an opportunity update one-nvim and let me know what you think about the changes to IncSearch
background
Thanks @Th3Whit3Wolf much better!
Regarding your comment about my cterm colors, I'm using kitty as my terminal emulator. Is it possible that these colors are being overridden by kitty? I'm not sure it really matters in my case, but I'd be interested in knowing what could cause something like that.
To my knowledge the terminal should not be able to affect variables inside of neovim other than environment variables. I would guess that another plugin is modifying IncSearch and Search but I'm not sure.
Also have you set termguicolors?
Yes, 'termguicolors'
is set.
It looks like something set reverse style for cterm
and gui
on rakr/vim-one and only cterm
on one-nvim. Since termguicolors
is set the cterm
value is ignored.
The
IncSearch
highlight should probably have a background to distinguish matches better. This background could ideally be a completely different color (or even just a slightly different hue) than theSearch
highlight.The issue can be seen when matching
Number
s,Boolean
s, and more:As you can see, the matched line is highlighted differently, but the matched text is not during incsearch (because the
IncSearch
highlight matches these other highlight groups). When<CR>
is pressed, the match is highlighted more clearly by theSearch
highlight:This gets even more confusing when there are other incsearch matches in the buffer, because everything except for the first match is highlighted clearly during the search.