Neovim mason-nvim¶
- ID
mason- Link
- Upstream stars
⭐ 10,497
- Last commit
2026-06-11
- Version requirement
>= 2
- Platforms
🅱️ BSD · 🐧 Linux · 🍎 macOS · ⨂ Unix · 🪟 Windows
- Operations
installed·install·upgrade·remove·sync- purl types
pkg:mason/- CLI name
nvim- Every call
nvim --headless <command> -c cquit- Issues and PRs
- Source
Installer of LSP servers, DAP adapters, linters and formatters for Neovim.
Important
mason is not a plugin manager, which is what separates it from
Lazy and Vim_Pack. Those install Lua
that runs inside the editor; mason installs ordinary developer tools, the same
stylua or rust-analyzer binaries another host might get from Homebrew.
Note
Wrapping it is what makes those tools visible at all: mason redirects every
backend it shells out to into the package’s own directory, so a pyright
installed by mason appears in no other manager’s inventory.
Warning
The install root is assumed to be mason’s default. A configuration moving
install_root_dir elsewhere leaves the inventory empty.
What mpm adds to mason¶
mpm reaches across every manager at once, not mason alone: mpm installed and mpm outdated cover mason alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your mason commands, in mpm¶
You already know mason: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Remove a package |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
|---|---|
|
✅ |
|
|
|
|
|
|
|
✅ |
|
✅ |
|
|
|
✅ |
|
✅ |
|
|
|
Configuration¶
Ignore
masonon thempmCLI by passing the--no-masonoption.Ignore it for every run in your configuration:
[mpm] mason = false
Raise the timeout of all
masoncalls:[mpm.overrides.mason] timeout = 900
Run
mpm config-template masonto print all overridable settings for your configuration file:[mpm.overrides.mason] cli_names = [ "nvim", ] cli_search_path = [] dry_run = false ignore_auto_updates = true plan = false post_args = [ "-c", "cquit", ] pre_args = [ "--headless", ] pre_cmds = [] requirement = ">=2.0.0" stop_on_error = false unmaintained = false version_cli_options = [ "--clean", "--headless", "-c", "lua local d = vim.fn.stdpath(\"data\") local c = vim.fn.glob(d .. \"/lazy/mason.nvim\", true, true) vim.list_extend(c, vim.fn.glob(d .. \"/site/pack/*/*/mason.nvim\", true, true)) for _, p in ipairs(c) do vim.opt.rtp:prepend(p) local ok, m = pcall(require, \"mason.version\") if ok then io.write(\"mason \" .. m.VERSION) break end end os.exit(0)", ] version_regexes = [ "mason v?(?P<version>\\S+)", ]
The arguments and environment variables listed in the box atop this page are forced on every mason call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.
Recipes¶
A few jobs you would otherwise script around mason, one mpm command each:
Snapshot and clone a machine:
mpm --mason dump mason.toml, thenmpm restore mason.tomlon the next one.Export a compliance SBOM:
mpm --mason sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.
None of its operations is privileged.
See privilege escalation for the full policy.
Cooldown¶
State of Neovim mason-nvim’s release-age gating, from the cooldown support table:
Status: ❌ None
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: GitHub release assets
Retraction: None: withdrawing a build is the upstream author deleting their own release or tag. Nothing sits between them and the user
Publish date: ✅ server-set
published_aton each release (REST API)
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.
Reference traces¶
A collection of raw native outputs captured from the manager’s own CLI and recorded in the manager source. If you know Neovim mason-nvim well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ nvim --headless --clean \
> -c 'lua local root = vim.fn.stdpath("data") .. "/mason" .. "/packages" for _, dir in ipairs(vim.fn.glob(root .. "/*", true, true)) do local f = dir .. "/mason-receipt.json" if (vim.uv or vim.loop).fs_stat(f) then local ok, r = pcall(vim.json.decode, table.concat(vim.fn.readfile(f), "\n")) if ok and r and r.name then local s = r.source or r.primary_source io.write(r.name .. "\t" .. ((s and s.id) or "") .. "\n") end end end os.exit(0)' \
> -c 'cquit'
stylua pkg:github/johnnymorganz/[email protected]
Version check¶
The version is probed by running:
$ nvim --clean --headless -c lua local d = vim.fn.stdpath("data") local c = vim.fn.glob(d .. "/lazy/mason.nvim", true, true) vim.list_extend(c, vim.fn.glob(d .. "/site/pack/*/*/mason.nvim", true, true)) for _, p in ipairs(c) do vim.opt.rtp:prepend(p) local ok, m = pcall(require, "mason.version") if ok then io.write("mason " .. m.VERSION) break end end os.exit(0)
mason v2.3.1
and extracted with:
r"mason v?(?P<version>\S+)"
Upstream project¶
Metrics |
|
|---|---|
Activity |
|
Popularity |
|
Metadata |
|
Changelog¶
8.0.0(2026-09-20)Add
mason, the Neovim installer for LSP servers, DAP adapters, linters and formatters, its inventory read off mason’s install tree by a--cleanNeovim.