clean up masoninstall cmd func : https://github.com/NvChad/ui/commit/a5c95d346ddb5c1a6a4bec60eda747a0f1f1ca4d
now users no longer need to have ensure_installed!
This commit is contained in:
@@ -105,24 +105,9 @@ return {
|
||||
config = function(_, opts)
|
||||
require("mason").setup(opts)
|
||||
|
||||
-- custom nvchad cmd to install all mason binaries listed
|
||||
vim.api.nvim_create_user_command("MasonInstallAll", function()
|
||||
if opts.ensure_installed and #opts.ensure_installed > 0 then
|
||||
vim.cmd "Mason"
|
||||
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
|
||||
require("nvchad.mason").install_all(opts.ensure_installed)
|
||||
end, {})
|
||||
|
||||
vim.g.mason_binaries_list = opts.ensure_installed
|
||||
end,
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user