mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat(plugin): dont include plugin spec fragments for disabled or optional plugins (#1058)
* feat(plugin): dont include plugin spec fragments for disabled or optional plugins * test: fixed tests * fix(plugin): calculate handlers after disabling plugins * fix(plugin): clear Plugin._.super when rebuilding * fix(ui): dont process handlers for disabled plugins * test: added tests for disabling fragments * fix(plugin): ignore any installed deps of a disabled conditional plugin. Fixes #1053
This commit is contained in:
parent
6b55e4695a
commit
f3c7169dd6
4 changed files with 181 additions and 80 deletions
|
@ -411,13 +411,15 @@ function M:plugin(plugin)
|
|||
else
|
||||
self:append(" ")
|
||||
local reason = {}
|
||||
for handler in pairs(Handler.types) do
|
||||
if plugin[handler] then
|
||||
local trigger = {}
|
||||
for _, value in ipairs(plugin[handler]) do
|
||||
table.insert(trigger, type(value) == "table" and value[1] or value)
|
||||
if plugin._.kind ~= "disabled" then
|
||||
for handler in pairs(Handler.types) do
|
||||
if plugin[handler] then
|
||||
local trigger = {}
|
||||
for _, value in ipairs(plugin[handler]) do
|
||||
table.insert(trigger, type(value) == "table" and value[1] or value)
|
||||
end
|
||||
reason[handler] = table.concat(trigger, " ")
|
||||
end
|
||||
reason[handler] = table.concat(trigger, " ")
|
||||
end
|
||||
end
|
||||
for _, other in pairs(Config.plugins) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue