wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.86k stars 267 forks source link

Fzf installed via package manager not being loaded in Packer #1127

Open esn89 opened 1 year ago

esn89 commented 1 year ago

I have a new problem after not changing my config, but updating packer:

I still have the fzf plugin directory:

stat /opt/local/share/fzf/vim/plugin 
  File: /opt/local/share/fzf/vim/plugin
  Size: 96          Blocks: 0          IO Block: 4096   directory
Device: 1,4 Inode: 57699156    Links: 3
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/   wheel)
Access: 2022-10-01 09:42:22.465031169 -0700
Modify: 2022-10-01 09:41:22.938754831 -0700
Change: 2022-10-01 09:41:22.938754831 -0700
 Birth: 2022-09-28 07:43:33.000000000 -0700

And doing ls shows that the fzf.vim exists:

 ls /opt/local/share/fzf/vim/plugin 
fzf.vim

My packer config shows:

    use('wbthomason/packer.nvim')

    local fzf_root = '/opt/local/share/fzf/vim/plugin'
    if vim.fn.isdirectory(fzf_root) == 1 then
        use(fzf_root)
        -- use('junegunn/fzf.vim')
    end

After running :PackerCompile and :PackerInstall, it still doesn't work.

:PackerStatus shows:

                packer.nvim - Total plugins: 17
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 • Comment.nvim
 • LuaSnip
 • cmp-buffer
 • cmp-cmdline
 • cmp-nvim-lsp
 • cmp-nvim-lua
 • cmp-path
 • everforest
 • lightspeed.nvim
 • null-ls.nvim
 • nvim-cmp
 • nvim-lspconfig
 • nvim-treesitter
 • packer.nvim
 • plenary.nvim
 • plugin
 • vim-surround

And doing :Files:

E117: Unknown function: fzf#vim#with_preview                                           
E116: Invalid arguments for function fzf#vim#files                                     
Press ENTER or type command to continue        

Any ideas?

EdenEast commented 1 year ago

Do you also have the fzf-vim plugin installed. This is the plugin that has the autoload function that is trying to be called.

esn89 commented 1 year ago

@EdenEast

I shouldn't need to. Because the package manager's FZF has the vim plugin in there already.

This is the working config in my work computer: https://github.com/esn89/nvim-configurations/blob/master/lua/plugins.lua

And that one works on the work computer but not my personal one.