junegunn / fzf.vim

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

how to install fzf with Packer? #1388

Open iamxiaojianzheng opened 2 years ago

iamxiaojianzheng commented 2 years ago

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()" }

bruhtus commented 2 years ago

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' }
erikw commented 1 year ago

Or as one use:

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