phpactor: Nvim commands don't work with VIM Plug
I have phpactor installed with composer globally and within vim with: Plug ‘phpactor/phpactor’, {‘for’: ‘php’, ‘branch’: ‘master’, ‘do’: ‘composer install --no-dev -o’}
" init.vim
let g:phpactor_executable = '~/.config/nvim/plugged/phpactor/bin/phpactor'
let g:phpactorPhpBin = "/usr/local/bin/php"
:PlugInstall
I also tried with develop but the result is the same. I also tried running composer install from plugged folder although I didn’t have any errors with PlugInstall but still all the commands from within vim don’t work. I have almost the same error with every command:

I am with the latest version of neovim. On MacOs Catalina
$ php -v
PHP 7.3.18 (cli) (built: May 14 2020 10:54:44) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.18, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.18, Copyright (c) 1999-2018, by Zend Technologies
I also tried to replay the issue from Vim commands with phpactor rpc --replay --verbose but /.cache/phpactor/replay.json is empty. All the commands from cli are working properly but inside vim nothing works, even the autocompletion is trowing errors.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 30 (3 by maintainers)
@dantleech @elythyr @przepompownia Guys, I found how to make it work with plug. The only solution was to set
call plug#begin('~/.config/nvim')insteadcall plug#begin('~/.config/nvim/plugged'). I hope that can be helpful for you 😃@vaklinzi Another alternative is https://github.com/kristijanhusak/vim-packager, it works exactly the same way as minpac the migration is therefore extremely easy. It brings one additional feature (at least for my use) which is a nice vertical split showing you what is going on during operations. You can even take a look at the output of each commands to see what was going wrong and stuff like that.
Also another point worth noticing with the optional packages mentioned by @przepompownia, they don’t work the same way as packages located in the
startdirectory. One issue we got here was that when you manually load a package withpackaddyou are actually doing it after the filetype was resolved andFileTypeevent emitted, softpluginare not loaded properly (I guess the same goes for syntax and stuff).Thanks, still very odd that it doesn’t work with VIM plugin, we can keep an eye on it and remember this issue 😃