diff options
author | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2024-08-29 22:08:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-29 12:08:30 -0700 |
commit | 862679c70fa062e567fd7f720f9fd994fa023101 (patch) | |
tree | 4b39c8178c7362590655732c9ac4b479ceff16f5 /src/nvim/edit.c | |
parent | 9a3c8f64a77742684e847221990a06ad87c03985 (diff) | |
download | rneovim-862679c70fa062e567fd7f720f9fd994fa023101.tar.gz rneovim-862679c70fa062e567fd7f720f9fd994fa023101.tar.bz2 rneovim-862679c70fa062e567fd7f720f9fd994fa023101.zip |
fix(highlight): update `PmenuSel` for colored completion items #30183
Problem: completion items can now have dedicated highlighting (through
`hl_group` and `kind_hlgroup` fields). Both of the fields combine
their highlight attributes with the underlying `PmenuXxx` group.
As default color scheme `Pmenu` and `PmenuSel` are intentionally
almost inverted versions of one another, the added highlighting will
be unreadable in one of them if done only through foreground (which is
the most convenient way for users and being able to do so is arguably
the biggest benefit of actually combining added highlighting).
Solution: adjust `PmenuSel` to utilize `attr=reverse`. This works
because `fg`/`bg` are first combined and only then reversed. This
results in a colored background for items with `hl_group` and
`kind_hlgroup` using text highlighting.
This also results in the same background for regular selected item,
while intentionally changing foreground from `Nvim{Light,Dark}Grey3`
to (essentially) `Nvim{Light,Dark}Grey2`. This both provides better
contrast ratio and does not need realigning of the whole block.
Diffstat (limited to 'src/nvim/edit.c')
0 files changed, 0 insertions, 0 deletions