aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeni Chasnovski <evgeni.chasnovski@gmail.com>2024-01-29 12:39:57 +0200
committerGitHub <noreply@github.com>2024-01-29 18:39:57 +0800
commit4f788f78f8b2d59a76b1a54a40af0c478eb3f929 (patch)
treee174b9681870a244a7a1bff86d85ed66f7ec25ad
parentca9f6f56949d66f0f6467fa64b215f861fe0a3bf (diff)
downloadrneovim-4f788f78f8b2d59a76b1a54a40af0c478eb3f929.tar.gz
rneovim-4f788f78f8b2d59a76b1a54a40af0c478eb3f929.tar.bz2
rneovim-4f788f78f8b2d59a76b1a54a40af0c478eb3f929.zip
vim-patch:9.1.0061: UX of visual highlighting can be improved (#27256)
Problem: UX of visual highlighting can be improved Solution: Improve readibility of visual highlighting, by setting better foreground and background colors The default visual highlighting currently is nice in that it overlays the actual syntax highlighting by using a separate distinct background color. However, this can cause hard to read text, because the contrast between the actual syntax element and the background color is way too low. That is an issue, that has been bothering colorschemes authors for quite some time so much, that they are defining the Visual highlighting group to use a separate foreground and background color, so that the syntax highlighting vanishes, but the text remains readable (ref: vim/colorschemesvim/vim#250) So this is an attempt to perform the same fix for the default Visual highlighting and just use a default foreground and background color instead of using reverse. I also removed the hard-coded changes to the Visual highlighting in init_highlight. It's not quite clear to me, why those were there and not added directly to the highlighting_init_<dark|light> struct. closes: vim/vim#13663 related: vim/colorschemes#250 https://github.com/vim/vim/commit/e6d8b4662ddf9356da53f56e363b67b524fd8825 Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/colors/vim.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/colors/vim.lua b/runtime/colors/vim.lua
index 67f9ddd643..b4ede93357 100644
--- a/runtime/colors/vim.lua
+++ b/runtime/colors/vim.lua
@@ -231,7 +231,7 @@ if vim.o.background == 'light' then
hi('SpellRare', { sp = 'Magenta', undercurl = true, ctermbg = 'LightMagenta' })
hi('TabLine', { bg = 'LightGrey', underline = true, ctermfg = 'Black', ctermbg = 'LightGrey', cterm = { underline = true } })
hi('Title', { fg = 'Magenta', bold = true, ctermfg = 'DarkMagenta' })
- hi('Visual', { bg = 'LightGrey', ctermbg = 'LightGrey' })
+ hi('Visual', { bg = 'LightGrey', ctermfg = 'White', ctermbg = 'DarkGrey' })
hi('WarningMsg', { fg = 'Red', ctermfg = 'DarkRed' })
hi('Comment', { fg = 'Blue', ctermfg = 'DarkBlue' })
hi('Constant', { fg = 'Magenta', ctermfg = 'DarkRed' })
@@ -270,7 +270,7 @@ else
hi('SpellRare', { sp = 'Magenta', undercurl = true, ctermbg = 'Magenta' })
hi('TabLine', { bg = 'DarkGrey', underline = true, ctermfg = 'White', ctermbg = 'DarkGrey', cterm = { underline = true } })
hi('Title', { fg = 'Magenta', bold = true, ctermfg = 'LightMagenta' })
- hi('Visual', { bg = 'DarkGrey', ctermbg = 'DarkGrey' })
+ hi('Visual', { bg = '#575757', ctermfg = 'Black', ctermbg = 'Grey' })
hi('WarningMsg', { fg = 'Red', ctermfg = 'LightRed' })
hi('Comment', { fg = '#80a0ff', ctermfg = 'Cyan' })
hi('Constant', { fg = '#ffa0a0', ctermfg = 'Magenta' })