From 310045fbef829d4ea68453af145163f531565a67 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Fri, 1 Dec 2023 15:26:01 -0500 Subject: [PATCH] Fix mason lspconfig startup errors --- lua/install-plugins.lua | 17 +++++------------ lua/plugins/lsp.lua | 7 +++++++ lua/plugins/mason-lspconfig-nvim.lua | 3 --- lua/plugins/mason-nvim.lua | 3 --- 4 files changed, 12 insertions(+), 18 deletions(-) delete mode 100644 lua/plugins/mason-lspconfig-nvim.lua delete mode 100644 lua/plugins/mason-nvim.lua diff --git a/lua/install-plugins.lua b/lua/install-plugins.lua index 29fc988..c88e18d 100644 --- a/lua/install-plugins.lua +++ b/lua/install-plugins.lua @@ -23,6 +23,11 @@ return require('packer').startup(function(use) use 'nvim-lua/plenary.nvim' use { 'neovim/nvim-lspconfig', + requires = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'hrsh7th/cmp-nvim-lsp', + }, config = function() require('plugins.lsp') end, @@ -64,18 +69,6 @@ return require('packer').startup(function(use) 'petertriho/cmp-git', requires = 'nvim-lua/plenary.nvim', } - use { - 'williamboman/mason.nvim', - config = function() - require('plugins.mason-nvim') - end, - } - use { - 'williamboman/mason-lspconfig.nvim', - config = function() - require('plugins.mason-lspconfig-nvim') - end, - } use { 'rmagatti/goto-preview', config = function() diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 0daf6dc..d65e910 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,3 +1,10 @@ +require('mason').setup({ + max_concurrent_installers = 10, +}) +require('mason-lspconfig').setup({ + automatic_installation = true, +}) + local on_attach = require('plugins.lsp.on_attach') -- Mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions diff --git a/lua/plugins/mason-lspconfig-nvim.lua b/lua/plugins/mason-lspconfig-nvim.lua deleted file mode 100644 index b534e7d..0000000 --- a/lua/plugins/mason-lspconfig-nvim.lua +++ /dev/null @@ -1,3 +0,0 @@ -require('mason-lspconfig').setup({ - automatic_installation = true, -}) diff --git a/lua/plugins/mason-nvim.lua b/lua/plugins/mason-nvim.lua deleted file mode 100644 index 82badff..0000000 --- a/lua/plugins/mason-nvim.lua +++ /dev/null @@ -1,3 +0,0 @@ -require('mason').setup({ - max_concurrent_installers = 10, -})