August 8th, 2024

Mason.nvim: package manager for Neovim: LSP&DAP servers, linters, and formatters

mason.nvim is a cross-platform package manager for Neovim, supporting LSP and DAP servers. The latest version is v1.10.0, with installation via Packer and vim-plug, allowing customization.

Read original articleLink Icon
Mason.nvim: package manager for Neovim: LSP&DAP servers, linters, and formatters

mason.nvim is a portable package manager designed for Neovim, facilitating the installation and management of Language Server Protocol (LSP) servers, Debug Adapter Protocol (DAP) servers, linters, and formatters through a unified interface. It is compatible with all major operating systems, including Linux, macOS, and Windows. The latest version available is v1.10.0. The package manager simplifies the process of managing external editor tools and is recommended to be used alongside other plugins such as lspconfig, nvim-dap, and null-ls.nvim for enhanced functionality. Installation can be done via popular package managers like Packer and vim-plug, with setup requiring a simple Lua command. Key commands include `:Mason` to open a graphical status window, `:MasonInstall <package>` to install a package, and `:MasonUninstall <package>` to remove a package. Users need to ensure they have Neovim version 0.7.0 or higher, along with utilities like git, curl, or wget, and unzip for Unix systems, or PowerShell for Windows. Customization options are available through the setup function, allowing users to modify the behavior and appearance of the package manager.

- mason.nvim is a package manager for Neovim, supporting LSP and DAP servers.

- It is cross-platform, functioning on Linux, macOS, and Windows.

- The latest version is v1.10.0, with installation options via Packer and vim-plug.

- Key commands facilitate package management, including installation and uninstallation.

- Customization is possible through the setup function in Lua.

Link Icon 2 comments
By @pseudo_meta - 7 months
Since there is apparently some confusion what mason is and what it is used for, a brief explainer.

As opposed to being a plugin manager, mason is a package manager. It installs editor-agnostic tools like LSPs, linters, or formatters.

As opposed to system-level package managers like homebrew, mason is specifically integrated in nvim. Other than having an UI inside nvim, this entails features such as auto-installing packages when bootstrapping nvim on a new machine.

As opposed to language-specific package managers such as npm or pip, mason includes packages across languages. That means instead of having to install one tool with npm, one with cargo, one with pip etc., you can install all your nvim-related packages just with mason.

While a plugin manager is basically a necessity, mason is more of a nice-to-have tool for nvim. It is convenient for some people, while others prefer using their existing package managers.

By @CoastalCoder - 7 months
I'm a somewhat casual neovim user, and I'm confused by the proliferation of package managers.

What motivates people to keep creating new ones?