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, -})