20 lines
503 B
Lua
20 lines
503 B
Lua
return {
|
|
"mason-org/mason.nvim",
|
|
cmd = "Mason",
|
|
build = ":MasonUpdate",
|
|
opts_extend = { "ensure_installed" },
|
|
opts = { ensure_installed = { "stylua", "lua-language-server", "gopls", "pyright" } },
|
|
event = "VeryLazy",
|
|
config = function(_, opts)
|
|
require("mason").setup(opts)
|
|
local mr = require("mason-registry")
|
|
|
|
mr.refresh(function()
|
|
for _, tool in ipairs(opts.ensure_installed) do
|
|
local p = mr.get_package(tool)
|
|
if not p:is_installed() then p:install() end
|
|
end
|
|
end)
|
|
end,
|
|
}
|