nvim/lua/masonDownload.lua
2024-05-28 00:15:08 -04:00

18 lines
455 B
Lua

local pkgs = {
"nixpkgs-fmt",
"jdtls",
"yaml-language-server",
"eslint_d",
}
local reg = require("mason-registry")
for _, pname in ipairs(pkgs) do
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
end
end