@@ -17,7 +17,8 @@ require('packer').startup(function(use)
17
17
use ' nvim-treesitter/nvim-treesitter' -- Highlight, edit, and navigate code
18
18
use ' nvim-treesitter/nvim-treesitter-textobjects' -- Additional textobjects for treesitter
19
19
use ' neovim/nvim-lspconfig' -- Collection of configurations for built-in LSP client
20
- use ' williamboman/nvim-lsp-installer' -- Automatically install language servers to stdpath
20
+ use ' williamboman/mason.nvim' -- Manage external editor tooling i.e LSP servers
21
+ use ' williamboman/mason-lspconfig.nvim' -- Automatically install language servers to stdpath
21
22
use { ' hrsh7th/nvim-cmp' , requires = { ' hrsh7th/cmp-nvim-lsp' } } -- Autocompletion
22
23
use { ' L3MON4D3/LuaSnip' , requires = { ' saadparwaiz1/cmp_luasnip' } } -- Snippet Engine and Snippet Expansion
23
24
use ' mjlbach/onedark.nvim' -- Theme inspired by Atom
@@ -303,11 +304,14 @@ end
303
304
-- nvim-cmp supports additional completion capabilities
304
305
local capabilities = require (' cmp_nvim_lsp' ).update_capabilities (vim .lsp .protocol .make_client_capabilities ())
305
306
307
+ -- Setup mason so it can manage external tooling
308
+ require (' mason' ).setup ()
309
+
306
310
-- Enable the following language servers
307
311
local servers = { ' clangd' , ' rust_analyzer' , ' pyright' , ' tsserver' , ' sumneko_lua' }
308
312
309
313
-- Ensure the servers above are installed
310
- require (' nvim-lsp-installer ' ).setup {
314
+ require (' mason-lspconfig ' ).setup {
311
315
ensure_installed = servers ,
312
316
}
313
317
0 commit comments