We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76327a4 commit d330741Copy full SHA for d330741
lua/user/lsp/mason.lua
@@ -23,7 +23,13 @@ local settings = {
23
}
24
25
require("mason").setup(settings)
26
-require("mason-lspconfig").setup({
+local status_malsp_ok, malsp = pcall(require, "mason-lspconfig")
27
+if not status_malsp_ok then
28
+ vim.notify("mason-lspconfig not found")
29
+ return
30
+end
31
+
32
+malsp.setup({
33
ensure_installed = servers,
34
automatic_installation = true,
35
})
@@ -35,7 +41,7 @@ end
41
36
42
local opts = {}
37
43
38
-for _, server in pairs(servers) do
44
+for _, server in pairs(malsp.get_installed_servers()) do
39
45
opts = {
40
46
on_attach = require("user.lsp.handlers").on_attach,
47
capabilities = require("user.lsp.handlers").capabilities,
0 commit comments