nvim/lua/masonDownload.lua

17 lines
410 B
Lua
Raw Normal View History

2024-05-28 00:15:08 -04:00
local pkgs = {
"nixpkgs-fmt",
"jdtls",
"yaml-language-server",
2024-05-28 00:15:08 -04:00
}
local reg = require("mason-registry")
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))
local handle = pkg:install(nil)
--while handle.state ~= "CLOSED" do
-- print(handle.stdout)
-- end
2024-05-28 00:15:08 -04:00
end
end