The following table lists the available configuration keys for mason.nvim. Refer to :h mason-settings for detailed documentation.
---@class MasonSettings
local DEFAULT_SETTINGS = {
-- The directory in which to install packages.
install_root_dir = path.concat { vim.fn.stdpath "data", "mason" },
-- Where Mason should put its bin location in your PATH.
-- "prepend" (default), "append", or "skip"
PATH = "prepend",
-- Controls to which degree logs are written to the log file.
log_level = vim.log.levels.INFO,
-- Limit for the maximum amount of packages to be installed at the same time.
max_concurrent_installers = 4,
-- The registries to source packages from.
registries = {
"github:mason-org/mason-registry",
},
-- The registries to source system packages from.
system_registries = {
"github:mason-org/mason-system-registry",
},
registry_cache = {
-- Whether Mason should automatically refresh the registry when needed.
refresh = true,
-- Amount of seconds before the local registry cache is considered stale.
duration = 24 * 60 * 60, -- 24 hours
},
firewall = {
-- Whether to enable the socket.dev firewall (sfw) for supported package sources.
enabled = false,
-- Whether mason.nvim should automatically install and update the Socket Firewall client.
auto_managed = true,
},
-- The provider implementations to use for resolving supplementary package metadata.
-- Builtin: "mason.providers.registry-api", "mason.providers.client"
providers = {
"mason.providers.registry-api",
"mason.providers.client",
},
github = {
-- The template URL to use when downloading assets from GitHub.
download_url_template = "https://github.com/%s/releases/download/%s/%s",
},
pip = {
-- Whether to upgrade pip to the latest version before installing packages.
upgrade_pip = false,
-- Args added to `pip install` calls.
install_args = {},
},
npm = {
-- Args added to `npm install` calls.
install_args = {},
},
ui = {
-- Whether to automatically check for new versions when opening the :Mason window.
check_outdated_packages_on_open = true,
-- The border to use for the UI window.
border = nil,
-- The backdrop opacity (0 is fully opaque, 100 is fully transparent).
backdrop = 60,
-- Width of the window (Integer > 1 or Float 0-1).
width = 0.8,
-- Height of the window (Integer > 1 or Float 0-1).
height = 0.9,
icons = {
package_installed = "◍",
package_pending = "◍",
package_uninstalled = "◍",
},
keymaps = {
toggle_package_expand = "<CR>",
install_package = "i",
update_package = "u",
check_package_version = "c",
update_all_packages = "U",
check_outdated_packages = "C",
uninstall_package = "X",
cancel_installation = "<C-c>",
apply_language_filter = "<C-f>",
toggle_package_install_log = "<CR>",
toggle_help = "g?",
},
},
}