


[](https://github.com/williamboman/mason.nvim/actions?query=workflow%3ATests+branch%3Amain+event%3Apush)
[](https://github.com/sponsors/williamboman)
Portable package manager for Neovim that runs everywhere Neovim runs.
Easily install and manage LSP servers, DAP servers, linters, and formatters.
:help mason.nvim
Latest version: v1.4.0
# Table of Contents - [Introduction](#introduction) - [How to use installed packages](#how-to-use-installed-packages) - [Screenshots](#screenshots) - [Requirements](#requirements) - [Installation](#installation) - [Setup](#setup) - [Extensions](#extensions) - [Commands](#commands) - [Registries](#registries) - [Configuration](#configuration) # Introduction > [`:h mason-introduction`][help-mason-introduction] `mason.nvim` is a Neovim plugin that allows you to easily manage external editor tooling such as LSP servers, DAP servers, linters, and formatters through a single interface. It runs everywhere Neovim runs (across Linux, macOS, Windows, etc.), with only a small set of [external requirements](#requirements) needed. Packages are installed in Neovim's data directory ([`:h standard-path`][help-standard-path]) by default. Executables are linked to a single `bin/` directory, which `mason.nvim` will add to Neovim's PATH during setup, allowing seamless access from Neovim builtins (shell, terminal, etc.) as well as other 3rd party plugins. For a list of all available packages, see https://mason-registry.dev/registry/list. ## How to use installed packages > [`:h mason-how-to-use-packages`][help-mason-how-to-use-packages] Although many packages are perfectly usable out of the box through Neovim builtins, it is recommended to use other 3rd party plugins to further integrate these. The following plugins are recommended: - LSP: [`lspconfig`][lspconfig] & [`mason-lspconfig.nvim`][mason-lspconfig.nvim] - DAP: [`nvim-dap`][nvim-dap] - Linters: [`null-ls.nvim`][null-ls.nvim] or [`nvim-lint`][nvim-lint] - Formatters: [`null-ls.nvim`][null-ls.nvim] or [`formatter.nvim`][formatter.nvim] [formatter.nvim]: https://github.com/mhartington/formatter.nvim [lspconfig]: https://github.com/neovim/nvim-lspconfig [mason-lspconfig.nvim]: https://github.com/williamboman/mason-lspconfig.nvim [null-ls.nvim]: https://github.com/jose-elias-alvarez/null-ls.nvim [nvim-dap]: https://github.com/mfussenegger/nvim-dap [nvim-lint]: https://github.com/mfussenegger/nvim-lint ## Screenshots | | | | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------: | |
|
|
|
|
|
|
|
# Requirements
> [`:h mason-requirements`][help-mason-requirements]
`mason.nvim` relaxes the minimum requirements by attempting multiple different utilities (for example, `wget`,
`curl`, and `Invoke-WebRequest` are all perfect substitutes).
The _minimum_ recommended requirements are:
- neovim `>= 0.7.0`
- For Unix systems: `git(1)`, `curl(1)` or `wget(1)`, `unzip(1)`, `tar(1)`, `gzip(1)`
- For Windows systems: pwsh or powershell, git, tar, and [7zip][7zip] or [peazip][peazip] or [archiver][archiver] or [winzip][winzip] or [WinRAR][winrar]
Note that `mason.nvim` will regularly shell out to external package managers, such as `cargo` and `npm`. Depending on
your personal usage, some of these will also need to be installed. Refer to `:checkhealth mason` for a full list.
[7zip]: https://www.7-zip.org/
[archiver]: https://github.com/mholt/archiver
[peazip]: https://peazip.github.io/
[winzip]: https://www.winzip.com/
[winrar]: https://www.win-rar.com/
# Installation
## [Packer](https://github.com/wbthomason/packer.nvim)
```lua
use {
"williamboman/mason.nvim",
run = ":MasonUpdate" -- :MasonUpdate updates registry contents
}
```
## [lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
{
"williamboman/mason.nvim",
build = ":MasonUpdate" -- :MasonUpdate updates registry contents
}
```
## [vim-plug](https://github.com/junegunn/vim-plug)
```vim
" :MasonUpdate updates registry contents
Plug 'williamboman/mason.nvim', { 'do': ':MasonUpdate' }
```
# Setup
> [`:h mason-quickstart`][help-mason-quickstart]
```lua
require("mason").setup()
```
`mason.nvim` is optimized to load as little as possible during setup. Lazy-loading the plugin, or somehow deferring the
setup, is not recommended.
Refer to the [Configuration](#configuration) section for information about which settings are available.
## Extensions
Refer to the [Wiki](https://github.com/williamboman/mason.nvim/wiki/Extensions) for a list of 3rd party extensions.
- [`mason-lspconfig.nvim`](https://github.com/williamboman/mason-lspconfig.nvim) - recommended for usage with `lspconfig`
# Commands
> [`:h mason-commands`][help-mason-commands]
- `:Mason` - opens a graphical status window
- `:MasonUpdate` - updates all managed registries
- `:MasonInstall :help mason.nvim!
[help-mason-commands]: ./doc/mason.txt#L177
[help-mason-how-to-use-packages]: ./doc/mason.txt#L153
[help-mason-introduction]: ./doc/mason.txt#L11
[help-mason-quickstart]: ./doc/mason.txt#L67
[help-mason-registry-refresh]: ./doc/mason.txt#L516
[help-mason-registry-update]: ./doc/mason.txt#L509
[help-mason-requirements]: ./doc/mason.txt#L50
[help-mason-settings]: ./doc/mason.txt#L237
[help-standard-path]: https://neovim.io/doc/user/starting.html#standard-path