summaryrefslogtreecommitdiff
path: root/lua/lvim/core/mason.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-08-09 10:41:17 +0200
committerGitHub <[email protected]>2022-08-09 10:41:17 +0200
commiteefde00ae80f91ecf88a93e869e346fdd04c7ba4 (patch)
tree873b8fc0248938ab060a1482f88c2d6d742ce61b /lua/lvim/core/mason.lua
parentd53b3743f2a259dbf90446216194ade2bb224ab7 (diff)
refactor!: migrate to mason.nvim (#2880)
Diffstat (limited to 'lua/lvim/core/mason.lua')
-rw-r--r--lua/lvim/core/mason.lua41
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