fzf.vim icon indicating copy to clipboard operation
fzf.vim copied to clipboard

how to install fzf with Packer?

Open iamxiaojianzheng opened this issue 2 years ago • 2 comments

  • [y] I have fzf 0.30.0 or above
  • [y] I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
  • [y] I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
  • [y] I have read through the manual page of fzf (man fzf)
  • [y] I have searched through the existing issues

I am using Packer to manage the nvim plugin. When I use fzf, it does not work properly. It always tells me that fzf#run cannot be found.

use { 'junegunn/fzf', run = "fzf#install()" }

iamxiaojianzheng avatar Apr 30 '22 00:04 iamxiaojianzheng

From your description, I'm guessing that fzf was not installed properly.

I'm not using packer myself, but looking at packer readme:

If an element of run is a string, then either:

  • If the first character of run is ":", it is treated as a Neovim command and executed.
  • Otherwise, run is treated as a shell command and run in the installation directory of the plugin via $SHELL -c '<run>'.

Maybe you can do something like this:

use { 'junegunn/fzf', run = ":call fzf#install()" }
use { 'junegunn/fzf.vim' }

bruhtus avatar May 01 '22 23:05 bruhtus

Or as one use:

use {
    'junegunn/fzf.vim',
    requires = { 'junegunn/fzf', run = ':call fzf#install()' }
 }

erikw avatar Mar 09 '23 19:03 erikw