feat(lsp): refactor

* Move configs into config subdirectory
 * Move LSP logic into classes
 * Make it possible to define mason package in lsp config,
   including nested dependency resolution and post install
   steps
 * replace jedi_language_server with pylsp
This commit is contained in:
2024-04-14 15:41:39 +02:00
parent 06898a5a31
commit 2bc21b248c
17 changed files with 671 additions and 376 deletions
+36
View File
@@ -0,0 +1,36 @@
-- spec:
-- https://github.com/bmewburn/intelephense-docs/blob/master/installation.md
-- https://github.com/bmewburn/vscode-intelephense/blob/master/package.json
return {
enable = true,
dependencies = {
"npm",
},
root_pattern = {
"composer.json",
"composer.lock",
"vendor",
},
mason = {
name = "intelephense",
-- version = "",
},
lspconfig = {
filetypes = {
"php",
},
cmd = { "intelephense", "--stdio", },
single_file_support = true,
settings = {
intelephense = {
environment = {
phpVersion = "7.4",
},
format = {
enable = true,
},
},
},
},
}