fzf-lua
fzf-lua copied to clipboard
Color issue
Info
- Operating System: Fedora 36
- Shell: bash or fish
- Terminal: Gnome Terminal 3.44.1
-
nvim --version
: NVIM v0.8.0-dev+775-g27ce21ac8 -
fzf --version
: 0.32.0
- [ ] The issue is reproducible with
minimal_init.lua
fzf-lua configuration
require('fzf-lua').setup({
})
Description
I have an issue with the way fzf-lua looks while using PaperColor theme.
Theme is set with colorscheme PaperColor
and set background=light
in init.vim
.
It looks like this:
-there is a black background character at the start of each entry
-the highlights in this case the 'in' are very hard to read, due to the light green color
I'm not sure if this is a bug with fzf-lua or the problem is somewhere else, or I simply need to set the colors myself manually.
Any help is appreciated!
This isn’t a bug, these are terminal colors automatically set by the fzf binary, man fzf
in the shell to see all the available color settings for Fzf and then set them to neovim highlights using the fzf_colors
setup option, the black character at the start is actually the default in fzf (in the shell too), if you wanna remove it set:
require'fzf-lua'.setup {
fzf_colors = {
["gutter"] = { "bg", "Normal" },
}
}
My setup for example looks like this:
hl_match
is a custom function I wrote to prioritize neovim highlights based on the color scheme
require'fzf-lua'.setup {
fzf_colors = {
["fg"] = { "fg", "Normal" },
["bg"] = { "bg", "Normal" },
["hl"] = { "fg", hl_match({ "NightflyViolet", "Directory" }) },
["fg+"] = { "fg", "Normal" },
["bg+"] = { "bg", hl_match({ "NightflyVisual", "CursorLine" }) },
["hl+"] = { "fg", "CmpItemKindVariable" },
["info"] = { "fg", hl_match({ "NightflyPeach", "WarningMsg" }) },
["prompt"] = { "fg", "SpecialKey" },
["pointer"] = { "fg", "DiagnosticError" },
["marker"] = { "fg", "DiagnosticError" },
["spinner"] = { "fg", "Label" },
["header"] = { "fg", "Comment" },
["gutter"] = { "bg", "Normal" },
}
}
use
:FzfLua highlights
to see a preview of your current colorscheme highlights.
Thanks for the help!