chore: changed manual config of LSPs from lspconfig.lua to automatic from list in mason-lspconfig.lua

This commit is contained in:
Afonso Franco 2022-12-06 17:55:11 +00:00
parent 70757ba4be
commit ddb8c1ffa5
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
2 changed files with 24 additions and 52 deletions

View file

@ -1,4 +1,19 @@
require("mason-lspconfig").setup({
ensure_installed = { "sumneko_lua", "rust_analyzer" , "texlab"},
local mason_lspconfig = require "mason-lspconfig"
mason_lspconfig.setup({
ensure_installed = { "sumneko_lua", "rust_analyzer" , "texlab", "hls"},
automatic_installation = true
})
local lspconfig = require "lspconfig"
mason_lspconfig.setup_handlers {
-- This is a default handler that will be called for each installed server (also for new servers that are installed during a session)
function (server_name)
lspconfig[server_name].setup {
on_attach = on_attach,
flags = lsp_flags,
}
end,
}