mason.lua 1.1 KB

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