Refactor(lsp): Ensure automatic server enabling

This commit is contained in:
Umut Sahin Onder 2025-05-17 13:56:36 +02:00
parent 718c90d224
commit 82949b8a26
1 changed files with 6 additions and 1 deletions

View File

@ -483,7 +483,7 @@ require('lazy').setup({
-- Mason must be loaded before its dependents so we need to set it up here. -- Mason must be loaded before its dependents so we need to set it up here.
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})` -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
{ 'mason-org/mason.nvim', opts = {} }, { 'mason-org/mason.nvim', opts = {} },
{ 'mason-org/mason-lspconfig.nvim', opts = {} }, 'mason-org/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP. -- Useful status updates for LSP.
@ -693,6 +693,11 @@ require('lazy').setup({
}, },
}, },
} }
---@type MasonLspconfigSettings
---@diagnostic disable-next-line: missing-fields
require('mason-lspconfig').setup {
automatic_enable = vim.tbl_keys(servers or {}),
}
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
-- --