Add phpactor support to neovim with default settings

This commit is contained in:
Jonny Barnes 2026-02-15 17:03:34 +00:00
commit 6d645999f2
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
4 changed files with 18 additions and 0 deletions

View file

@ -38,6 +38,8 @@ echo "Setting up NeoVim"
test -d $HOME/.config/nvim || mkdir -p $HOME/.config/nvim
test -d $HOME/.local/share/nvim || mkdir -p $HOME/.local/share/nvim
test -L $HOME/.config/nvim/init.lua || ln -f -s $BASEDIR/neovim/init.lua $HOME/.config/nvim/init.lua
test -d $HOME/.config/nvim/lsp || mkdir -p $HOME/.config/nvim/lsp
test -L $HOME/.config/nvim/lsp/phpactor.lua || ln -f -s $BASEDIR/neovim/lsp/phpactor.lua $HOME/.config/nvim/lsp/phpactor.lua
# .gitconfig gets edited by .extra so we won't symlink it, but copy it
echo "For compatibility we shall copy the global gitconfig"

View file

@ -21,3 +21,6 @@ vim.opt.spell = true
-- 24-bit colour support
vim.opt.termguicolors = true
-- LSP/PHP setup
vim.lsp.enable('phpactor')

10
neovim/lsp/phpactor.lua Normal file
View file

@ -0,0 +1,10 @@
return {
cmd = { 'phpactor', 'language-server' },
filetypes = { 'php' },
root_markers = { '.git', 'composer.json', '.phpactor.json', '.phpactor.yml' },
workspace_required = true,
init_options = {
["language_server_phpstan.enabled"] = false,
["language_server_psalm.enabled"] = false,
}
}

View file

@ -68,6 +68,9 @@ export GRAVEYARD="$HOME/.local/share/Trash"
# composer global
export PATH="$PATH:$HOME/.composer/vendor/bin"
# phpactor installed manually
export PATH="$PATH:$HOME/git/phpactor/bin"
# rust/cargo bin PATH
export PATH="$PATH:$HOME/.cargo/bin"