junegunn / fzf.vim

fzf :heart: vim
MIT License
9.51k stars 581 forks source link

Errors running any command inside neovim #1550

Closed ahmedelgabri closed 4 weeks ago

ahmedelgabri commented 4 weeks ago

Minimal config using lazy.nvim

local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
    vim.fn.system {
        'git',
        'clone',
        '--filter=blob:none',
        'https://github.com/folke/lazy.nvim.git',
        '--branch=stable', -- latest stable release
        lazypath,
    }
end
vim.opt.rtp:prepend(lazypath)

require('lazy').setup {
    'https://github.com/junegunn/fzf.vim',
    -- I have the fzf binary installed already, that's why I don't need to run build step here
    dependencies = { { 'https://github.com/junegunn/fzf' } },
}

Here is the error I get when I run :Files

Error running 'fzf'  --border  --border  '-m' '--prompt' '~/' '--preview' '/run/current-system/sw/bin/bash '\''/Users/ahmedelgabri/.local/share/nvim-test/lazy/fzf.vim/bin/preview.sh'\'' {}' '--bind' 'ctrl-/:toggle-preview' --expect=ctrl-v,ctrl-x,ctrl-t --no-height --no-tmux > /var/fo
lders/t3/p9nxdwgs65564nf0ffplltym0000gn/T/nvim-test.ahmedelgabri/k9g0GE/0

https://github.com/junegunn/fzf.vim/assets/63876/be25afb4-8d19-4880-a60d-b291d51f6494

junegunn commented 4 weeks ago

-- I have the fzf binary installed already, that's why I don't need to run build step here

Looks like you have updated the Vim plugin, but not the binary. You need fzf 0.53.0.

ahmedelgabri commented 4 weeks ago

@junegunn thanks, but right now I can't do this so which commit should I pin the plugin too until I update the binary?

junegunn commented 4 weeks ago

Previous release tag will do.

But you can just run :call fzf#install() to get the latest binary. We've been telling users to set up post-update hooks (https://github.com/junegunn/fzf/blob/master/README-VIM.md#installation).

Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
ahmedelgabri commented 4 weeks ago

@junegunn never had an issue before today (have been using fzf and fzf.vim for maybe 8-9 years, thanks for that BTW!) will look into this later and update my config. Thanks for the help and the tools!