fzf.devicon.vim
fzf.devicon.vim copied to clipboard
FilesWithDevicons fails
:GFilesWithDevicons
and :RgWithDevicons
work great.
:FilesWithDevicons
on the other hand opens the fzf window but just shows
[Command failed: | devicon-lookup]
Not sure where to start looking for the why.
NVIM v0.8.3
Dev Icon Lookup v0.8.1
latest fzf.devicon.vim
Hey @iameru!
Hmm I don't think I can reproduce this on my end...
What is your FZF_DEFAULT_COMMAND
env var set to?
https://github.com/coreyja/fzf.devicon.vim/blob/master/autoload/fzf/devicon/vim.vim#L368
That is used in FilesWithDevicons
to determine what to run to search for files
Since your other devicon-lookup commands are working it feels like the devicon-lookup
binary and everything is working well
Thanks for trying out fzf.devicon.vim
! Hope we can get this resolved for ya
What is your
FZF_DEFAULT_COMMAND
env var set to? https://github.com/coreyja/fzf.devicon.vim/blob/master/autoload/fzf/devicon/vim.vim#L368
I don't have it set apparently, but have devicons in my Path
~$ echo "$FZF_DEFAULT_COMMAND"
~$ which devicon-lookup
/home/user/.cargo/bin//devicon-lookup
I hope aswell. It's nice to have visual feedback in my editor. Not using Files that often though so its not soooo important but maybe we can find the reason
@iameru Can you try setting that env var as a work around for right now?
Mine is set to this to use rg
rg --files --no-ignore --hidden --follow --glob "!.git/*" 2> /dev/null
Haven't been in this code base in awhile lol, but I'm not actually seeing a fallback if $FZF_DEFAULT_COMMAND
isn't defined in code right now...
So that might be the issue!
Will try to get that patched if setting the env var works for ya!
got some time to try again. Still an error [Command failed: | devicon-lookup
when using :FilesWithDevicons
.
$ echo "$FZF_DEFAULT_COMMAND" 13.7s
rg --files --no-ignore --hidden --follow --glob "!.git/*" 2> /dev/null
I just went and hardcoded the following line in the vim.vim
file.
Now it worked.
" let args.source = $FZF_DEFAULT_COMMAND.' | devicon-lookup'
let args.source = 'rg --files --no-ignore --hidden --follow --glob "!.git/*" 2> /dev/null | devicon-lookup'
@iameru Ahh glad you found a workaround!
I'll still try to take a look at this sometime soon
Ok, So I was trying again. Setting the ENV correctly via export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*" 2> /dev/null'
actually worked.
so the loading in line 368 does its job properly.
in the readme.md it says:
... (runs $FZF_DEFAULT_COMMAND if defined)
which is not really true. (as it runs it regardless, there is no if
)
Maybe there need to be a reminder - or drop the support for FZF_DEFAULT_COMMAND, as I was never aware until raising this issue that this exists and still don't know why I should set this myself