@@ -4,31 +4,37 @@ local M = {}
44
55--- @class MasonSettings
66local DEFAULT_SETTINGS = {
7+ --- @since 1.0.0
78 -- The directory in which to install packages.
89 install_root_dir = path .concat { vim .fn .stdpath " data" , " mason" },
910
11+ --- @since 1.0.0
1012 -- Where Mason should put its bin location in your PATH. Can be one of:
1113 -- - "prepend" (default, Mason's bin location is put first in PATH)
1214 -- - "append" (Mason's bin location is put at the end of PATH)
1315 -- - "skip" (doesn't modify PATH)
1416 --- @type ' "prepend"' | ' "append"' | ' "skip"'
1517 PATH = " prepend" ,
1618
19+ --- @since 1.0.0
1720 -- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when
1821 -- debugging issues with package installations.
1922 log_level = vim .log .levels .INFO ,
2023
24+ --- @since 1.0.0
2125 -- Limit for the maximum amount of packages to be installed at the same time. Once this limit is reached, any further
2226 -- packages that are requested to be installed will be put in a queue.
2327 max_concurrent_installers = 4 ,
2428
29+ --- @since 1.0.0
2530 -- [Advanced setting]
2631 -- The registries to source packages from. Accepts multiple entries. Should a package with the same name exist in
2732 -- multiple registries, the registry listed first will be used.
2833 registries = {
2934 " github:mason-org/mason-registry" ,
3035 },
3136
37+ --- @since 1.0.0
3238 -- The provider implementations to use for resolving supplementary package metadata (e.g., all available versions).
3339 -- Accepts multiple entries, where later entries will be used as fallback should prior providers fail.
3440 -- Builtin providers are:
@@ -40,6 +46,7 @@ local DEFAULT_SETTINGS = {
4046 },
4147
4248 github = {
49+ --- @since 1.0.0
4350 -- The template URL to use when downloading assets from GitHub.
4451 -- The placeholders are the following (in order):
4552 -- 1. The repository (e.g. "rust-lang/rust-analyzer")
@@ -49,9 +56,11 @@ local DEFAULT_SETTINGS = {
4956 },
5057
5158 pip = {
59+ --- @since 1.0.0
5260 -- Whether to upgrade pip to the latest version in the virtual environment before installing packages.
5361 upgrade_pip = false ,
5462
63+ --- @since 1.0.0
5564 -- These args will be added to `pip install` calls. Note that setting extra args might impact intended behavior
5665 -- and is not recommended.
5766 --
@@ -60,52 +69,72 @@ local DEFAULT_SETTINGS = {
6069 },
6170
6271 ui = {
72+ --- @since 1.0.0
6373 -- Whether to automatically check for new versions when opening the :Mason window.
6474 check_outdated_packages_on_open = true ,
6575
76+ --- @since 1.0.0
6677 -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
6778 border = " none" ,
6879
80+ --- @since 1.0.0
6981 -- Width of the window. Accepts:
7082 -- - Integer greater than 1 for fixed width.
7183 -- - Float in the range of 0-1 for a percentage of screen width.
7284 width = 0.8 ,
7385
86+ --- @since 1.0.0
7487 -- Height of the window. Accepts:
7588 -- - Integer greater than 1 for fixed height.
7689 -- - Float in the range of 0-1 for a percentage of screen height.
7790 height = 0.9 ,
7891
7992 icons = {
93+ --- @since 1.0.0
8094 -- The list icon to use for installed packages.
8195 package_installed = " ◍" ,
96+ --- @since 1.0.0
8297 -- The list icon to use for packages that are installing, or queued for installation.
8398 package_pending = " ◍" ,
99+ --- @since 1.0.0
84100 -- The list icon to use for packages that are not installed.
85101 package_uninstalled = " ◍" ,
86102 },
87103
88104 keymaps = {
105+ --- @since 1.0.0
89106 -- Keymap to expand a package
90107 toggle_package_expand = " <CR>" ,
108+ --- @since 1.0.0
91109 -- Keymap to install the package under the current cursor position
92110 install_package = " i" ,
111+ --- @since 1.0.0
93112 -- Keymap to reinstall/update the package under the current cursor position
94113 update_package = " u" ,
114+ --- @since 1.0.0
95115 -- Keymap to check for new version for the package under the current cursor position
96116 check_package_version = " c" ,
117+ --- @since 1.0.0
97118 -- Keymap to update all installed packages
98119 update_all_packages = " U" ,
120+ --- @since 1.0.0
99121 -- Keymap to check which installed packages are outdated
100122 check_outdated_packages = " C" ,
123+ --- @since 1.0.0
101124 -- Keymap to uninstall a package
102125 uninstall_package = " X" ,
126+ --- @since 1.0.0
103127 -- Keymap to cancel a package installation
104128 cancel_installation = " <C-c>" ,
129+ --- @since 1.0.0
105130 -- Keymap to apply language filter
106131 apply_language_filter = " <C-f>" ,
132+ --- @since 1.1.0
107133 -- Keymap to toggle viewing package installation log
108134 toggle_package_install_log = " <CR>" ,
135+ --- @since 1.8.0
136+ -- Keymap to toggle the help view
137+ toggle_help = " g?" ,
109138 },
110139 },
111140}
0 commit comments