mirror of https://github.com/folke/lazy.nvim.git
feat(ui): show when plugin would be loaded for unloaded plugins. Fixes #261
This commit is contained in:
parent
d02a10d832
commit
5575d2b2a9
|
@ -374,6 +374,22 @@ function M:plugin(plugin)
|
|||
local plugin_start = self:row()
|
||||
if plugin._.loaded then
|
||||
self:reason(plugin._.loaded)
|
||||
else
|
||||
self:append(" ")
|
||||
local reason = {}
|
||||
for handler in pairs(Handler.types) do
|
||||
if plugin[handler] then
|
||||
for _, value in ipairs(plugin[handler]) do
|
||||
reason[handler] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
for _, other in pairs(Config.plugins) do
|
||||
if vim.tbl_contains(other.dependencies or {}, plugin.name) then
|
||||
reason.plugin = other.name
|
||||
end
|
||||
end
|
||||
self:reason(reason)
|
||||
end
|
||||
self:diagnostics(plugin)
|
||||
self:nl()
|
||||
|
|
Loading…
Reference in New Issue