Closed thyssentishman closed 5 months ago
It should work. Does :echo $FZF_DEFAULT_OPTS
report the right value?
It should work. Does
:echo $FZF_DEFAULT_OPTS
report the right value?
Yes it does, but for some reason it doesn't seem to be respected:
You can see that the prompts are different, and that the selected line is highlighted with a different background. Do I have to manually override --promt
and bg+
?
Do I have to manually override
--promt
andbg+
?
Here is the results with those overrides:
Better, but the prompt is still not correct. This also tells me that the vim plugin seems to be setting its own custom settings (different than the fzf regular defaults). If FZF_DEFAULT_OPTS
doesn't override these, then we get what's happening here.
Can these vim custom settings be cleared and just use plain fzf defaults? Would it maybe be better to only use the vim plugin custom settings if FZF_DEFAULT_OPTS
is not set?
This also tells me that the vim plugin seems to be setting its own custom settings (different than the fzf regular defaults).
Okay this seems to be the case cause I'm using :FZF
. Now I've change my keymap to the following and now it's working:
vim.keymap.set('n', '<Leader>f', '<CMD>call fzf#run(fzf#wrap())<CR>')
The --prompt
override doesn't seem necessary now, but the bg+
does. With this change both fzf in the terminal and in vim look the same.
Closing issue.
Yes, :FZF
command does that for you because it allows you to pass a directory to start search from.
e.g. :FZF ~/
, :FZF /tmp
, etc.
If you don't like it, fzf#run(fzf#wrap())
is the right way.
Start :terminal
inside Neovim, run fzf
, and see if the colors look right. IIRC, Neovim terminal has its own color palette and you may need to override the colors.
See https://github.com/junegunn/fzf/blob/master/README-VIM.md#fzf-inside-terminal-buffer
Thank you :)
Checklist
man fzf
)Output of
fzf --version
0.46.1
OS
Shell
Problem / Steps to reproduce
For some reason when running
:FZF
inside neovim, theFZF_DEFAULT_OPTS
are not being respected. I have the following (almost default) configuration:I'm using the fzf binary installed on my system and everything else works as expected. I've tried overriding the
$FZF_DEFAULT_OPTS
variables as suggested in #1715 but without success:Not sure if this is related to neovim or fzf. Any ideas?