mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat(loader): incrementally install missing plugins and rebuild spec, so imported specs from plugins work as expected
This commit is contained in:
parent
919b7f5de3
commit
2d06faa941
3 changed files with 43 additions and 17 deletions
|
@ -80,18 +80,23 @@ function Spec:add(plugin, is_dep)
|
|||
end
|
||||
|
||||
function Spec:error(msg)
|
||||
self:notify(msg, vim.log.levels.ERROR)
|
||||
self:log(msg, vim.log.levels.ERROR)
|
||||
end
|
||||
|
||||
function Spec:warn(msg)
|
||||
self:notify(msg, vim.log.levels.WARN)
|
||||
self:log(msg, vim.log.levels.WARN)
|
||||
end
|
||||
|
||||
---@param msg string
|
||||
---@param level number
|
||||
function Spec:notify(msg, level)
|
||||
function Spec:log(msg, level)
|
||||
self.notifs[#self.notifs + 1] = { msg = msg, level = level, file = self.importing }
|
||||
Util.notify(msg, level)
|
||||
end
|
||||
|
||||
function Spec:report()
|
||||
for _, notif in ipairs(self.notifs) do
|
||||
Util.notify(notif.msg, notif.level)
|
||||
end
|
||||
end
|
||||
|
||||
---@param spec LazySpec|LazySpecImport
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue