mason.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. local M = {}
  2. function M.config()
  3. lvim.builtin.mason = {
  4. ui = {
  5. border = "rounded",
  6. keymaps = {
  7. toggle_package_expand = "<CR>",
  8. install_package = "i",
  9. update_package = "u",
  10. check_package_version = "c",
  11. update_all_packages = "U",
  12. check_outdated_packages = "C",
  13. uninstall_package = "X",
  14. cancel_installation = "<C-c>",
  15. apply_language_filter = "<C-f>",
  16. },
  17. },
  18. log_level = vim.log.levels.INFO,
  19. max_concurrent_installers = 4,
  20. github = {
  21. -- The template URL to use when downloading assets from GitHub.
  22. -- The placeholders are the following (in order):
  23. -- 1. The repository (e.g. "rust-lang/rust-analyzer")
  24. -- 2. The release version (e.g. "v0.3.0")
  25. -- 3. The asset name (e.g. "rust-analyzer-v0.3.0-x86_64-unknown-linux-gnu.tar.gz")
  26. download_url_template = "https://github.com/%s/releases/download/%s/%s",
  27. },
  28. }
  29. end
  30. function M.setup()
  31. local status_ok, mason = pcall(reload, "mason")
  32. if not status_ok then
  33. return
  34. end
  35. mason.setup(lvim.builtin.mason)
  36. end
  37. return M