[nvim] feat: auto install lsp servers

python, lua, bash, tex
This commit is contained in:
David JULIEN 2021-10-17 12:49:55 +02:00
parent 17f7b09431
commit 6bd3c20f7d
1 changed files with 18 additions and 0 deletions

View File

@ -15,6 +15,24 @@ lsp_installer.settings {
}
}
local servers = {
"bashls",
"jedi_language_server",
"texlab",
"sumneko_lua",
}
for _, name in pairs(servers) do
local ok, server = lsp_installer.get_server(name)
-- Check that the server is supported in nvim-lsp-installer
if ok then
if not server:is_installed() then
print("Installing " .. name)
server:install()
end
end
end
lsp_installer.on_server_ready(function(server)
local opts = {}