From a851329f679719654189adaf1b02e8dff5b82fcb Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Tue, 26 Dec 2023 16:57:49 -0600 Subject: [PATCH] fix(nvim): setup Mason *prior* to lspconfig if `Mason` cmds invoked --- dots/.config/nvim/lua/plugins/configs/lsp.lua | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/dots/.config/nvim/lua/plugins/configs/lsp.lua b/dots/.config/nvim/lua/plugins/configs/lsp.lua index 3e81b728..2075923d 100644 --- a/dots/.config/nvim/lua/plugins/configs/lsp.lua +++ b/dots/.config/nvim/lua/plugins/configs/lsp.lua @@ -127,7 +127,20 @@ return { "folke/neodev.nvim", "Decodetalkers/csharpls-extended-lsp.nvim", "williamboman/mason-lspconfig.nvim", - { "williamboman/mason.nvim", cmd = { "Mason" } }, + { + "williamboman/mason.nvim", + cmd = { + "Mason", + "MasonLog", + "MasonUpdate", + "MasonInstall", + "MasonUninstall", + "MasonUninstallAll" + }, + opts = { + max_concurrent_installers = 12 + } + }, "simrat39/rust-tools.nvim", "Hoffs/omnisharp-extended-lsp.nvim", "b0o/schemastore.nvim", @@ -191,10 +204,6 @@ return { }, event = { "BufReadPre", "BufNewFile" }, config = function() - require("mason").setup({ - max_concurrent_installers = 12, - }) - local mason_lspconfig = require("mason-lspconfig") local lspconfig = require("lspconfig")