diff --git a/home/programs/neovim.nix b/home/programs/neovim.nix index e3577e7..f549c50 100644 --- a/home/programs/neovim.nix +++ b/home/programs/neovim.nix @@ -314,6 +314,27 @@ in { ''; } + # LSP (=Language Server Protocol) + + { + plugin = nvim-lspconfig; + type = "lua"; + config = '' + require'lspconfig'.phpactor.setup({ + cmd = { + '${phpactor}/bin/phpactor', + 'language-server', + }, + }) + ''; + } + + { + plugin = lsp_signature-nvim; + type = "lua"; + config = pkgs.lib.fileContents ./neovim/plugins/lsp-signature.lua; + } + # More related to testing, linting, … { diff --git a/home/programs/neovim/configuration/after/ftplugin/php.vim b/home/programs/neovim/configuration/after/ftplugin/php.vim index 3aa4885..bdee4ea 100644 --- a/home/programs/neovim/configuration/after/ftplugin/php.vim +++ b/home/programs/neovim/configuration/after/ftplugin/php.vim @@ -7,8 +7,6 @@ syn spell toplevel set nospell if exists('&omnifunc') && exists('g:loaded_phpactor') - setlocal omnifunc=phpactor#Complete - " Would enable autocompletion via lsp - " setlocal omnifunc=v:lua.vim.lsp.omnifunc + setlocal omnifunc=v:lua.vim.lsp.omnifunc endif diff --git a/home/programs/neovim/plugins/lsp-signature.lua b/home/programs/neovim/plugins/lsp-signature.lua new file mode 100644 index 0000000..58a85a3 --- /dev/null +++ b/home/programs/neovim/plugins/lsp-signature.lua @@ -0,0 +1,4 @@ +require "lsp_signature".setup({ + -- For now, as this would hide parts of autocomplete + floating_window = false, +})