From 82949b8a263631fd2884a9f57e01a3390e8084f2 Mon Sep 17 00:00:00 2001 From: Umut Sahin Onder Date: Sat, 17 May 2025 13:56:36 +0200 Subject: [PATCH] Refactor(lsp): Ensure automatic server enabling --- init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 6ca67b50..c214f9c2 100644 --- a/init.lua +++ b/init.lua @@ -483,7 +483,7 @@ require('lazy').setup({ -- 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({})` { 'mason-org/mason.nvim', opts = {} }, - { 'mason-org/mason-lspconfig.nvim', opts = {} }, + 'mason-org/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', -- 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 --