Add LSP basics (PHP)
Add for PHP via existing phpactor as server. Use new signature plugin for proper none irritating inline help during function calls. TODO: Get rid of preview window showing up …
This commit is contained in:
parent
a842f100b0
commit
40cef5b623
|
@ -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, …
|
||||
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
4
home/programs/neovim/plugins/lsp-signature.lua
Normal file
4
home/programs/neovim/plugins/lsp-signature.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
require "lsp_signature".setup({
|
||||
-- For now, as this would hide parts of autocomplete
|
||||
floating_window = false,
|
||||
})
|
Loading…
Reference in a new issue