Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary (and odd) background for some highlight groups #140

Open
cdelledonne opened this issue Jul 18, 2020 · 0 comments
Open

Unnecessary (and odd) background for some highlight groups #140

cdelledonne opened this issue Jul 18, 2020 · 0 comments

Comments

@cdelledonne
Copy link

Problem

Some highlight groups define a background color that seems unnecessary, and that overrides the color of some other elements, like the cursorline. This happens with Normal, htmlBold*, htmlItalic, htmlUnderline*, and probably some others too.

As an example, here's what happens for these highlight groups when they are in the cursorline:

image

The background of the last word overrides the background of the cursorline. I would expect these highlight groups to blend in with the rest, possibly not defining any background color.

Environment

  • Nvim v0.4.3
  • Tmux inside Alacritty terminal emulator
  • No gruvbox_256palette.sh
  • Minimal .vimrc (uses vim-plug)
    call plug#begin('~/.local/share/nvim/plug')
    Plug 'gruvbox-community/gruvbox'
    call plug#end()
    set cursorline
    set termguicolors
    let g:gruvbox_contrast_dark = 'hard'
    colorscheme gruvbox

To reproduce

Start editing an empty buffer, and paste the following text at the beginning of the buffer:

Highlight as: Normal
Highlight as: htmlBold
Highlight as: htmlItalic
Highlight as: htmlUnderline

Then, manually apply some highlight to the last word of each line. For instance, inside nvim, run the following 4 commands:

:call nvim_buf_add_highlight(0, -1, 'Normal', 0, 14, -1)
:call nvim_buf_add_highlight(0, -1, 'htmlBold', 1, 14, -1)
:call nvim_buf_add_highlight(0, -1, 'htmlItalic', 2, 14, -1)
:call nvim_buf_add_highlight(0, -1, 'htmlUnderline', 3, 14, -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant