Skip to content

Commit 82949b8

Browse files
committed
Refactor(lsp): Ensure automatic server enabling
1 parent 718c90d commit 82949b8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

init.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ require('lazy').setup({
483483
-- Mason must be loaded before its dependents so we need to set it up here.
484484
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
485485
{ 'mason-org/mason.nvim', opts = {} },
486-
{ 'mason-org/mason-lspconfig.nvim', opts = {} },
486+
'mason-org/mason-lspconfig.nvim',
487487
'WhoIsSethDaniel/mason-tool-installer.nvim',
488488

489489
-- Useful status updates for LSP.
@@ -693,6 +693,11 @@ require('lazy').setup({
693693
},
694694
},
695695
}
696+
---@type MasonLspconfigSettings
697+
---@diagnostic disable-next-line: missing-fields
698+
require('mason-lspconfig').setup {
699+
automatic_enable = vim.tbl_keys(servers or {}),
700+
}
696701

697702
-- Ensure the servers and tools above are installed
698703
--

0 commit comments

Comments
 (0)