Closed tomtomjhj closed 5 months ago
problem 1 In (Neo)Vim, the default highlight link defined by :highlight default link is restored when :highlight clear is run (which is run by colorscheme scripts). However, non-link :highlight default is not restored, and just cleared.
I’m aware of that, I wanted to avoid yer another autocmd managed by fzf-lua, similar to the way some status line plugins require running a specific function to reset the highlight fzf-lua requires running :FzfLua setup_highlights
.
problem 2 The foreground color of default non-link highlights are quite bright, so they are not legible in light background colorschemes. It would be great if fzf-lua sets non-link default highlights based on the current 'background', or use default links for all groups.
Perhaps we can come with different colors for a light scheme or link these to actual highlights (not from the color map), any recommendations would be welcome.
@tomtomjhj, https://github.com/ibhagwan/fzf-lua/commit/74906d0906293992d7b11744e40e5cec9131d9af takes care of both problems (1) and (2), the code will now auto-detect both background and colorschme changes and setup the highlights accordingly (similarly to the way nvim-web-devicons
was also updated on bg change).
This commit also sets up better default colors for bg="light"
backgrounds, note that if your colorscheme doesn't support bg="light"
or doesn't adjust accordingly (i.e. the background is still a dark color), fzf-lua will still use the light color set as it has no awareness of the actual color, only vim.o.bg
.
Thanks, it looks great!
Info
nvim --version
: 0.9.5 and current master[x] The issue is reproducible with
mini.sh
problem 1
In (Neo)Vim, the default highlight link defined by
:highlight default link
is restored when:highlight clear
is run (which is run by colorscheme scripts). However, non-link:highlight default
is not restored, and just cleared.But some fzf-lua highlight groups are defined with non-link
hi-default
: https://github.com/ibhagwan/fzf-lua/blob/5104ac1744b92f888ef9f1d4bb6ff14e700c7a37/lua/fzf-lua/init.lua#L62-L73. So their hightlights are lost when the user loads another colorscheme.A solution I'm aware of is to setup a
Colorscheme
autocmd that defines the highlights.problem 2
The foreground color of default non-link highlights are quite bright, so they are not legible in light background colorschemes. It would be great if fzf-lua sets non-link default highlights based on the current
'background'
, or use default links for all groups.