This commit is contained in:
RingOfStorms (Joshua Bell) 2023-06-13 03:34:04 -05:00
parent 42a3ec0172
commit 66c32e98f5
9 changed files with 230 additions and 96 deletions

View file

@ -20,5 +20,31 @@ function M.keymaps(mappings)
end
end
function M.spread(template)
local result = {}
for key, value in pairs(template) do
result[key] = value
end
return function(table)
for key, value in pairs(table) do
result[key] = value
end
return result
end
end
function M.ensure_installed_mason(items)
local registry = require 'mason-registry'
for _, item in ipairs(items) do
if not registry.is_installed(item) then
if registry.has_package(item) then
registry.get_package(item).install()
end
end
end
registry.refresh()
end
return M