explaingit

mason-org/mason.nvim

10,276LuaAudience · developerComplexity · 3/5Setup · moderate

TLDR

A Neovim plugin that acts as a one-stop package manager for language servers, linters, formatters, and debuggers, browse, install, and update them all from inside the editor with a single keypress.

Mindmap

mindmap
  root((mason.nvim))
    What it does
      Neovim tool manager
      In-editor UI
    Tool types
      Language servers
      Linters
      Formatters
      Debuggers
    Usage
      Browse and search
      Install with keypress
      Update and remove
    Platform support
      Linux
      macOS
      Windows
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Install and manage language servers for code completion and error checking in Neovim without hunting for binaries manually

USE CASE 2

Update all installed linters and formatters at once from the :Mason window without leaving the editor

USE CASE 3

Set up Neovim on a new machine quickly by letting Mason reinstall all your preferred tools automatically

USE CASE 4

Browse hundreds of available tools filtered by programming language to discover what is available for a new language you are learning

Tech stack

LuaNeovim

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Neovim 0.7+ and a plugin manager, some tools need platform dependencies like curl, wget, or a compiler already installed on the system.

In plain English

Mason.nvim is a plugin for Neovim, a highly configurable text editor popular with developers who prefer working in the terminal. The plugin acts as a package manager specifically for the external tools that Neovim needs to provide features like code completion, error checking, and code formatting. When you write code in Neovim, the editor can connect to language-specific helper programs called language servers that understand a given programming language and report problems in real time. There are also debuggers, linters (tools that flag style problems), and formatters (tools that tidy up code layout). Each of these needs to be installed separately on your computer, which can involve hunting down binaries or running different install commands for different languages. Mason handles all of that from inside Neovim itself. Opening the Mason interface with the command :Mason shows a window listing hundreds of available tools. You can search by name or filter by language, install with a keypress, and update or remove tools the same way. Mason stores everything in Neovim's own data directory so installations do not scatter files across the system. The plugin works across Linux, macOS, and Windows. On each platform it uses whatever download tools are already available, such as curl, wget, or PowerShell's built-in downloader, so it does not require a specific tool to be pre-installed. Configuration is minimal. Adding Mason to a Neovim plugin manager and calling its setup function is enough to get started. The full list of supported packages lives on a separate website maintained by the project. The plugin is open-source and accepts bug reports and contributions through GitHub.

Copy-paste prompts

Prompt 1
How do I add mason.nvim to my Neovim config with lazy.nvim and install the TypeScript language server so I get code completion in .ts files?
Prompt 2
Show me how to use mason.nvim to install and configure eslint_d as a linter and prettier as a formatter for JavaScript projects in Neovim
Prompt 3
What is the minimal mason.nvim setup I need in init.lua to auto-install a list of language servers every time I open Neovim on a new machine?
Prompt 4
How do I update all mason.nvim packages at once and check which ones are outdated?
Open on GitHub → Explain another repo

← mason-org on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.