junegunn / fzf.vim

fzf :heart: vim
MIT License
9.59k stars 582 forks source link

fzf not working in neovim. Failed to run "fzf --version" #1368

Closed atticusmatticus closed 2 years ago

atticusmatticus commented 2 years ago

Running any fzf.vim commands in neovim result in an error. :Files gives:

Error detected while processing function fzf#vim#files[15]..<SNR>97_fzf[1]..<SNR>97_check_requirements[11]..fzf#exec:
line   31:
E605: Exception not caught: Failed to run "fzf --version"

Some version info for my environment:

$ fzf --version
0.29.0 (brew)
$ brew info fzf
fzf: stable 0.29.0 (bottled), HEAD
brew info nvim                                                                                                                         ─╯
neovim: stable 0.6.1 (bottled), HEAD

Searching through other issues I've tried a few things with the subsequent output:

  1. Deleting the fzf and fzf.vim directories in my ~/.local/share/nvim/plugged/ directory and reinstalling with a :PlugInstall.

This had no effect

  1. As per another closed issue that fixed a problem related to fzf --version output being the issue, I ran :PlugUpdate! fzf and I get the following error message in the vim-plug window:
Updated. Elapsed time: 0.673774 sec.
[x]

- Finishing ... Done!
x Post-update hook for fzf ... Failed to download fzf: /Users/my_user/.local/share/nvim/plugged/fzf/install --bin
- fzf: Already up to date.
junegunn commented 2 years ago

Try running /Users/my_user/.local/share/nvim/plugged/fzf/install --bin in your shell and examine why it fails.

atticusmatticus commented 2 years ago
$ /Users/my_user/.local/share/nvim/plugged/fzf/install --bin
Downloading bin/fzf ...
  - Found in $PATH
  - Creating symlink: bin/fzf -> /opt/homebrew/bin/fzf
  - Checking fzf executable ... 0.29.0
atticusmatticus commented 2 years ago

After running that, now when I run :Files in neovim I get the following error message:

Error detected while processing function fzf#vim#files[15]..<SNR>97_fzf[1]..<SNR>97_check_requirements[11]..fzf#exec:
line   31:
E605: Exception not caught: Failed to run "/Users/my_user/.local/share/nvim/plugged/fzf/bin/fzf --version"

when I run that command in my terminal I get this:

/Users/my_user/.local/share/nvim/plugged/fzf/bin/fzf --version
0.29.0 (brew)
junegunn commented 2 years ago

What's the output of :echo &shell?

atticusmatticus commented 2 years ago

it was /usr/local/bin/zsh which was the old path from my intel Mac but I now have a ARM Mac so after changing it to /opt/homebrew/bin/zsh the problem appears to be fixed.

Thank you so much.

meikse commented 2 years ago

I get the same error message as described in the header. I also investigated some time to fix the error. Since i used fzf in bash beforehand, I installed it with the APT manager on my ubuntu 20.04 machine:

sudo apt-get install fzf

Since the version 0.20.0 is obsolete for fzf.vim, and I have no idea if it is effecting fzf.vim, I purged it!

I also did the PlugClean and PlugInstall. And also did the PlugUpdate. But i still get this error:

Error detected while processing function fzf#vim#files[15]..<SNR>81_fzf[1]..<SNR>81_che
ck_requirements[11]..fzf#exec:
line   31:
E605: Exception not caught: Failed to run "/home/USER/.config/nvim/plugins/fzf/bin/fzf --version"

This is where I wanted to continue :

Try running /Users/my_user/.local/share/nvim/plugged/fzf/install --bin in your shell and examine why it fails.

but I do not even have a /plugged direction (or however it is called).

PS: that fzf is not included in my $PATH

I would be thankful for help! :pray: