Neovim for Beginners — Package Manager Plugin

Use mason.nvim to install and manage LSP servers, DAP servers, linters, and formatters.

alpha2phi
3 min readJul 30, 2022
Neovim for Beginners — Package Manager Plugin

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 of mason.nvim that bridges mason.nvim with the nvim-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.

--

--

alpha2phi
alpha2phi

Written by alpha2phi

Software engineer, Data Science and ML practitioner.

No responses yet