Skip to content

Commit

Permalink
feat: support lazy-loading rocks-config.nvim bundles (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Sep 16, 2024
1 parent fc46b0a commit c917d4b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lua/rocks-lazy/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@ function rocks_lazy.load()
local rock_spec = user_rocks[plugin.name]
if rock_spec then
pcall(vim.cmd.packadd, { plugin.name, bang = true })
rocks_config.configure(rock_spec)
rocks_config.configure(
rock_spec,
---@param items? rock_name[]
function(items)
vim
.iter(items or {})
---@param item rock_name
:each(function(item)
pcall(vim.cmd.packadd, { item, bang = true })
end)
end
)
else
log.warn(
("rocks-lazy: skipping rocks-config hook because %s not found in user rocks."):format(
Expand Down

0 comments on commit c917d4b

Please sign in to comment.