Closed esn89 closed 2 years ago
That's not how you do it.
/opt/local/bin/fzf
is the binary file, not the plugin directory.
You'll need to use the value of $(brew --prefix)/opt/fzf
as stated here: https://formulae.brew.sh/formula/fzf
It'll be something like this: https://github.com/MunifTanjim/dotfiles/blob/5287c3ca89b7f773a3d8af6d8d78f3fe1c47062c/private_dot_config/nvim/lua/config/plugins.lua#L298-L301
With the fzf_root
being:
vim.trim(vim.fn.system('brew --prefix')) .. '/opt/fzf'
@MunifTanjim
I am using macports so I do not have the brew --prefix
command. Macports installs everything in /opt/local/bin
, including fzf.
I did do something similar, but still getting this:
local fzf_root = '/opt/local/bin'
if vim.fn.isdirectory(fzf_root) == 1 then
use(fzf_root)
use('junegunn/fzf.vim')
end
But when I try to do, :Files
, I see something like:
/opt/local/bin
is where the binary file lives. You need the directory where the plugin
folder lives.
@MunifTanjim
Hang on, I am now a bit confused.
So I need both, or only the plugin folder?
Try running port notes fzf
, it should output something like this: https://github.com/macports/macports-ports/blob/260f33aa2a03fe0adb28933dbd00daf029163d09/sysutils/fzf/Portfile#L156-L168
And the directory should be something like /opt/local/share/fzf/vim
... that's the directory you need.
local fzf_root = '/opt/local/share/fzf/vim'
So I need both, or only the plugin folder?
fzf_root
should be set to where the plugin
folder is located. In your case, it's probably /opt/local/share/fzf/vim
.
@MunifTanjim
Thanks for your reply.
So right now I have:
local fzf_root = '/opt/local/share/fzf/vim'
if vim.fn.isdirectory(fzf_root) == 1 then
use(fzf_root)
use('junegunn/fzf.vim')
end
But now with this config, I get:
can you run fzf --version
from your terminal?
You should open issue on fzf.vim
repo, this really has nothing to do with packer.nvim
. Maybe check a few existing issues there: https://github.com/junegunn/fzf.vim/issues?q=failed+to+run ?
@MunifTanjim
Of course, yes right here:
fzf --version
0.32.0 (MacPorts)
@MunifTanjim I have fixed it. Turns out my vim was using the wrong shell.
nvim --version
: NVIM v0.7.2git --version
: git version 2.32.1 (Apple Git-133)Steps to reproduce
Use homebrew/macports to install fzf to
/opt/local/bin/fzf
Use my packer config:
Actual behaviour
What happens when I run
:PackerInstall
:However, fzf does exist on that path:
Expected behaviour
I expect it to pick up that path so I can use fzf.vim
packer files
Post the contents of ~/.cache/nvim/packer.nvim.log here