Mason
Mason installs anything that isn’t a Neovim plugin — LSP servers, formatters, linters, the tree-sitter CLI, debuggers. Blak wires it so the tools an extra needs install automatically when you enable the extra.
Tools setup: lua/blak/core/tools.lua. Plugin spec: lua/blak/plugins/lsp.lua.
Defaults
Section titled “Defaults”mason = { automatic_install = true, ensure_installed = { "stylua", "shfmt", "tree-sitter-cli", },}Just enough to make first-launch useful: a Lua formatter (for the config files Blak ships), a shell formatter, and the CLI for compiling Treesitter parsers.
Extras add to this list automatically — see each extra’s “Mason” row in Extras.
Automatic install
Section titled “Automatic install”When automatic_install = true, Blak calls tools.ensure() after Mason wakes on VeryLazy, :Mason, or the first Mason-backed LSP buffer:
- Wait for the Mason registry to refresh.
- Look up the configured package list (
mason.ensure_installed+ extras). - Install anything missing.
- Skip anything already installed (silent), or log it if called with
force = true.
Missing packages don’t error — they warn so a typo or a Mason-renamed tool doesn’t block startup.
Manual install
Section titled “Manual install”:BlakToolsInstall " force, logs already-installed packages too:Mason " open Mason's UI:MasonInstall <pkg> " install one explicitlyUse :BlakToolsInstall after enabling a new extra so its tools land in one shot.
Disabling automatic install
Section titled “Disabling automatic install”return { mason = { automatic_install = false },}You’ll need to install tools yourself with :BlakToolsInstall or :Mason.
Adding a tool
Section titled “Adding a tool”In user.lua:
return { mason = { ensure_installed = { "stylua", "shfmt", "tree-sitter-cli", "buf", "yamlfmt" }, },}Like other lists, this replaces the default wholesale. Include the defaults you still want.
Or via an extra, so its configuration is removed when you disable it and restart. Installed tools remain in Mason until you explicitly uninstall them.
Mason UI
Section titled “Mason UI”The Mason UI uses your ui.winborder (default "rounded"). Open with :Mason. From there:
iinstalluupdateXuninstall?help
Where things live
Section titled “Where things live”$XDG_DATA_HOME/<appname>/mason/ " for Blak, usually ~/.local/share/blak/mason ├── packages/<name>/ " installed binaries / scripts └── bin/ " shims added to runtime $PATHmason-lspconfig bridges between Mason package names (lua-language-server) and lspconfig server names (lua_ls). The ensure_installed list it sends to Mason is derived from lsp.servers keys. Only configured servers are automatically enabled. mason.automatic_install = false disables automatic installation of both tools and language servers; :BlakToolsInstall explicitly requests both.