aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeni Chasnovski <evgeni.chasnovski@gmail.com>2025-01-30 14:21:40 +0200
committerGitHub <noreply@github.com>2025-01-30 04:21:40 -0800
commit86ae59c6128641d8be612c3bdc9f4b190434c0d3 (patch)
tree2a1c2c68d96e0d93e85681a93f82f6a21d43e5dd
parentb3b255396d9fad56c074099b0cdcdbbecab79d4a (diff)
downloadrneovim-86ae59c6128641d8be612c3bdc9f4b190434c0d3.tar.gz
rneovim-86ae59c6128641d8be612c3bdc9f4b190434c0d3.tar.bz2
rneovim-86ae59c6128641d8be612c3bdc9f4b190434c0d3.zip
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`.
-rw-r--r--src/nvim/highlight_group.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c
index f3c0d66bb8..901d2c84bc 100644
--- a/src/nvim/highlight_group.c
+++ b/src/nvim/highlight_group.c
@@ -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",