diff options
author | kylo252 <[email protected]> | 2022-08-29 14:35:15 +0200 |
---|---|---|
committer | kylo252 <[email protected]> | 2022-08-29 14:35:15 +0200 |
commit | 439e0c205a4c09545f08816ab5100fb5d9a93d3b (patch) | |
tree | 4d3767b7e921dd707fe859b98bbaa5081fce205c /lua/lvim/core/mason.lua | |
parent | 47e4e5b83808f784010aa480753beaaef16ac579 (diff) | |
parent | df84e4ecce5a7c8838fd21d5de939128f3214ef4 (diff) |
Merge remote-tracking branch 'origin/rolling'
Diffstat (limited to 'lua/lvim/core/mason.lua')
-rw-r--r-- | lua/lvim/core/mason.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lua/lvim/core/mason.lua b/lua/lvim/core/mason.lua new file mode 100644 index 00000000..39be4f42 --- /dev/null +++ b/lua/lvim/core/mason.lua @@ -0,0 +1,41 @@ +local M = {} + +function M.config() + lvim.builtin.mason = { + ui = { + 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>", + }, + }, + log_level = vim.log.levels.INFO, + 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", + }, + } +end + +function M.setup() + local status_ok, mason = pcall(require, "mason") + if not status_ok then + return + end + + mason.setup(lvim.builtin.mason) +end + +return M |