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:
@@ -0,0 +1,54 @@
|
||||
-- spec: https://luals.github.io/wiki/settings/
|
||||
|
||||
---@type ServerConfig
|
||||
return {
|
||||
enable = true,
|
||||
mason = {
|
||||
name = "lua-language-server",
|
||||
-- version = "",
|
||||
},
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"lua",
|
||||
},
|
||||
cmd = { "lua-language-server", },
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
showWord = "Disable",
|
||||
},
|
||||
diagnostics = {
|
||||
disable = { "missing-fields", },
|
||||
},
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
path = {
|
||||
"lua/?.lua",
|
||||
"lua/?/init.lua",
|
||||
"?/lua/?.lua",
|
||||
"?/lua/?/init.lua",
|
||||
},
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
"/usr/share/lua/5.3",
|
||||
vim.fn.stdpath("data") .. "/lazy",
|
||||
},
|
||||
checkThirdParty = false,
|
||||
},
|
||||
hint = {
|
||||
enable = false,
|
||||
arrayIndex = "Disable",
|
||||
await = true,
|
||||
paramName = "All",
|
||||
paramType = true,
|
||||
semicolon = "Disable",
|
||||
setType = true,
|
||||
},
|
||||
telemetry = { enable = false, },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user