2024-05-28 00:15:08 -04:00
|
|
|
local pkgs = {
|
|
|
|
"nixpkgs-fmt",
|
|
|
|
"jdtls",
|
2024-07-11 19:48:02 -04:00
|
|
|
"yaml-language-server",
|
2024-05-28 00:15:08 -04:00
|
|
|
}
|
|
|
|
local reg = require("mason-registry")
|
2024-07-11 19:48:02 -04:00
|
|
|
for _, pname in ipairs(pkgs) do
|
2024-05-28 00:15:08 -04:00
|
|
|
local pkg = reg.get_package(pname)
|
|
|
|
if not pkg:is_installed() then
|
|
|
|
print(string.format("[masonDownload.lua]: %s is not installed. Installing.", pname))
|
2024-07-11 19:48:02 -04:00
|
|
|
local handle = pkg:install(nil)
|
|
|
|
--while handle.state ~= "CLOSED" do
|
|
|
|
-- print(handle.stdout)
|
|
|
|
-- end
|
2024-05-28 00:15:08 -04:00
|
|
|
end
|
|
|
|
end
|