fix(colorscheme): distinguish CursorLine/Folded/StatusLineNC highlights #32256

Problem: currently `CursorLine`, `Folded`, `StatusLineNC` highlight
  groups have the same background color in default color scheme (Grey3).
  This is a result of optimizing their highlighting to be different from
  `Normal` but not draw too much attention.

  However, this design has a usability issue as those groups are
  sometimes appear together which can make it hard (but not impossible)
  to differentiate between them.

  This was previously partially resolved with `StatusLineNC` using Grey1
  as background (and thus be different from `CursorLine` but closer to
  `Normal`), but optimizing more towards it being a visible separator
  between windows was decided to be more important.

Solution: make `Folded` use Grey1 and `StatusLineNC` use Grey4. This
  makes all three highlight groups have different backgrounds with the
  following consequences:
    - Folds now have the same background as floating windows. It makes
      them there differentiable only by the value of 'foldtext' (which
      is usually enough). Optimizing for the case "cursor line is next
      to the fold" seems to be more useful than for the case "make folds
      in floating window differ by background".
    - Statusline of inactive windows now draw more attention to them.
      The benefits are that they are different from cursor column and
      are better window separators.
    - Inactive tabline (both `TabLine` and `TabLineFill`) now also draws
      a bit more attention to it (as they are linked to `StatusLineNC`)
      but with the benefit of also being different from `CursorLine`.
This commit is contained in:
Evgeni Chasnovski
2025-01-30 14:21:40 +02:00
committed by GitHub
parent b3b255396d
commit 86ae59c612

View File

@@ -364,7 +364,7 @@ static const char *highlight_init_light[] = {
"ErrorMsg guifg=NvimDarkRed ctermfg=1",
"FloatShadow guibg=NvimLightGrey4 ctermbg=0 blend=80",
"FloatShadowThrough guibg=NvimLightGrey4 ctermbg=0 blend=100",
"Folded guifg=NvimDarkGrey4 guibg=NvimLightGrey3",
"Folded guifg=NvimDarkGrey4 guibg=NvimLightGrey1",
"LineNr guifg=NvimLightGrey4",
"MatchParen guibg=NvimLightGrey4 gui=bold cterm=bold,underline",
"ModeMsg guifg=NvimDarkGreen ctermfg=2",
@@ -387,7 +387,7 @@ static const char *highlight_init_light[] = {
"SpellLocal guisp=NvimDarkGreen gui=undercurl cterm=undercurl",
"SpellRare guisp=NvimDarkCyan gui=undercurl cterm=undercurl",
"StatusLine guifg=NvimLightGrey3 guibg=NvimDarkGrey3 cterm=reverse",
"StatusLineNC guifg=NvimDarkGrey3 guibg=NvimLightGrey3 cterm=bold,underline",
"StatusLineNC guifg=NvimDarkGrey2 guibg=NvimLightGrey4 cterm=bold,underline",
"Title guifg=NvimDarkGrey2 gui=bold cterm=bold",
"Visual guibg=NvimLightGrey4 ctermfg=15 ctermbg=0",
"WarningMsg guifg=NvimDarkYellow ctermfg=3",
@@ -448,7 +448,7 @@ static const char *highlight_init_dark[] = {
"ErrorMsg guifg=NvimLightRed ctermfg=9",
"FloatShadow guibg=NvimDarkGrey4 ctermbg=0 blend=80",
"FloatShadowThrough guibg=NvimDarkGrey4 ctermbg=0 blend=100",
"Folded guifg=NvimLightGrey4 guibg=NvimDarkGrey3",
"Folded guifg=NvimLightGrey4 guibg=NvimDarkGrey1",
"LineNr guifg=NvimDarkGrey4",
"MatchParen guibg=NvimDarkGrey4 gui=bold cterm=bold,underline",
"ModeMsg guifg=NvimLightGreen ctermfg=10",
@@ -471,7 +471,7 @@ static const char *highlight_init_dark[] = {
"SpellLocal guisp=NvimLightGreen gui=undercurl cterm=undercurl",
"SpellRare guisp=NvimLightCyan gui=undercurl cterm=undercurl",
"StatusLine guifg=NvimDarkGrey3 guibg=NvimLightGrey3 cterm=reverse",
"StatusLineNC guifg=NvimLightGrey3 guibg=NvimDarkGrey3 cterm=bold,underline",
"StatusLineNC guifg=NvimLightGrey2 guibg=NvimDarkGrey4 cterm=bold,underline",
"Title guifg=NvimLightGrey2 gui=bold cterm=bold",
"Visual guibg=NvimDarkGrey4 ctermfg=0 ctermbg=15",
"WarningMsg guifg=NvimLightYellow ctermfg=11",