summaryrefslogtreecommitdiff
path: root/lua/lvim/core/mason.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lvim/core/mason.lua')
-rw-r--r--lua/lvim/core/mason.lua82
1 files changed, 39 insertions, 43 deletions
diff --git a/lua/lvim/core/mason.lua b/lua/lvim/core/mason.lua
index ab58c5c8..3a5bdd1c 100644
--- a/lua/lvim/core/mason.lua
+++ b/lua/lvim/core/mason.lua
@@ -3,58 +3,54 @@ local M = {}
local join_paths = require("lvim.utils").join_paths
function M.config()
- local config = {
- opts = {
- ui = {
- border = "rounded",
- 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>",
- },
+ lvim.builtin.mason.opts = {
+ ui = {
+ border = "rounded",
+ 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>",
},
+ },
- -- NOTE: should be available in $PATH
- install_root_dir = join_paths(vim.fn.stdpath "data", "mason"),
+ -- NOTE: should be available in $PATH
+ install_root_dir = join_paths(vim.fn.stdpath "data", "mason"),
- -- NOTE: already handled in the bootstrap stage
- PATH = "skip",
+ -- NOTE: already handled in the bootstrap stage
+ PATH = "skip",
- pip = {
- -- These args will be added to `pip install` calls. Note that setting extra args might impact intended behavior
- -- and is not recommended.
- --
- -- Example: { "--proxy", "https://proxyserver" }
- install_args = {},
- },
+ pip = {
+ -- These args will be added to `pip install` calls. Note that setting extra args might impact intended behavior
+ -- and is not recommended.
+ --
+ -- Example: { "--proxy", "https://proxyserver" }
+ install_args = {},
+ },
- -- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when
- -- debugging issues with package installations.
- log_level = vim.log.levels.INFO,
+ -- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when
+ -- debugging issues with package installations.
+ log_level = vim.log.levels.INFO,
- -- Limit for the maximum amount of packages to be installed at the same time. Once this limit is reached, any further
- -- packages that are requested to be installed will be put in a queue.
- max_concurrent_installers = 4,
+ -- Limit for the maximum amount of packages to be installed at the same time. Once this limit is reached, any further
+ -- packages that are requested to be installed will be put in a queue.
+ max_concurrent_installers = 4,
- github = {
- -- The template URL to use when downloading assets from GitHub.
- -- The placeholders are the following (in order):
- -- 1. The repository (e.g. "rust-lang/rust-analyzer")
- -- 2. The release version (e.g. "v0.3.0")
- -- 3. The asset name (e.g. "rust-analyzer-v0.3.0-x86_64-unknown-linux-gnu.tar.gz")
- download_url_template = "https://github.com/%s/releases/download/%s/%s",
- },
+ github = {
+ -- The template URL to use when downloading assets from GitHub.
+ -- The placeholders are the following (in order):
+ -- 1. The repository (e.g. "rust-lang/rust-analyzer")
+ -- 2. The release version (e.g. "v0.3.0")
+ -- 3. The asset name (e.g. "rust-analyzer-v0.3.0-x86_64-unknown-linux-gnu.tar.gz")
+ download_url_template = "https://github.com/%s/releases/download/%s/%s",
},
}
- ---@cast config +LvimBuiltin
- require("lvim.core.builtins").extend_defaults(config)
- lvim.builtin.mason = config
+ lvim.builtin.mason = require("lvim.core.builtins").add_completion "mason"
end
function M.get_prefix()