Neovim for Beginners — Package Manager Plugin
Use mason.nvim to install and manage LSP servers, DAP servers, linters, and formatters.
We use the nvim-lsp-installer
plugin to install and manage the LSP servers. In this article, we will refactor our existing configuration to use mason.nvim
. It is the next-generation version of nvim-lsp-installer
that makes it easy to install LSP servers, DAP servers, linters, and formatters.
This article is part of the Neovim for Beginners series.
The Neovim configuration files are available in this repository.
Getting Started
In our existing configuration, we will install these 3 plugins.
mason.nvim
that allows us to easily manage external editor tooling such as LSP servers, DAP servers, linters, and formatters through a single interface.mason-lspconfig.nvim
which is an extension ofmason.nvim
that bridgesmason.nvim
with thenvim-lspconfig
plugin, making it easier to use both plugins together.mason-tool-installer.nvim
is a simple plugin that helps to install or upgrade all of the third-party tools.
In the lua/plugins.lua
file, we add the lines to install these plugins.