Allow configuring intelephense instead of phpactor

This commit is contained in:
Tony Messias 2024-06-16 00:18:33 -03:00
parent eca8692451
commit 083f379b8d
No known key found for this signature in database
GPG key ID: B283D359C3316FB2

View file

@ -1,3 +1,11 @@
if lazyvim_docs then
-- LSP Server to use for PHP.
-- Set to "intelephense" to use intelephense instead of phpactor.
vim.g.lazyvim_php_lsp = "intelephense"
end
local lsp = vim.g.lazyvim_php_lsp or "phpactor"
return {
recommended = {
ft = "php",
@ -13,7 +21,15 @@ return {
"neovim/nvim-lspconfig",
opts = {
servers = {
phpactor = {},
phpactor = {
enabled = lsp == "phpactor",
},
intelephense = {
enabled = lsp == "intelephense",
},
[lsp] = {
enabled = true,
},
},
},
},