sainnhe / gruvbox-material

Gruvbox with Material Palette
MIT License
1.96k stars 166 forks source link

[Help] Gruvbox + CoC Show references = current line is barely visible #134

Closed jmg-duarte closed 2 years ago

jmg-duarte commented 2 years ago

Hello!

I didn't submit a bug report because this may be configurable and I just don't know how.

I'm using this theme along with CoC and when I "go to references" the following happens:

Screen Shot 2022-07-13 at 09 24 07

Where the line without an highlight is the currently selected one. I'd like to make it visible, is there any way?

Theme config:

vim.cmd('syntax enable')
vim.opt.background = "dark"
vim.cmd('filetype plugin indent on')

if vim.opt.termguicolors then
    vim.opt.termguicolors = true
end

vim.g.gruvbox_material_background = 'hard'
vim.g.gruvbox_material_better_performance = 1
vim.g.gruvbox_material_foreground = 'original'
vim.g.gruvbox_material_enable_bold = 1
vim.g.gruvbox_material_enable_italic = 1
vim.g.gruvbox_material_ui_contrast = 'high'
vim.g.gruvbox_material_statusline_style = 'original'
vim.cmd('colorscheme gruvbox-material')
sainnhe commented 2 years ago

This is because the CursorLine hi group is conflict with Search hi group.

The CursorLine hi group defined a grey background and the Search hi group defined a green background and a black foreground.

What happens is that the invisible words uses the foreground of Search but uses the background of CursorLine, which is not expected.

The expected behavior should be using both foreground and background color of Search.

IMO this bug can't be fixed in color scheme level since what a color scheme does is simply defining hi groups, it does not actually highlight the colors, this job is done in a syntax highlighting engine.

So maybe you should report this bug to coc or vim/neovim (I'm not sure which one causes this bug).