diff options
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 | 
