mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-29 03:44:14 +00:00
prioritize plugin cond
- loader: Don't enable plugin's lazy loaders if plugin's condition isn't met - manage: Only Check for updates if plugin's condition is met - view: Don't show lazy loader details for disabled plugins
This commit is contained in:
parent
4739c2d95a
commit
916ac4a4b0
4 changed files with 20 additions and 11 deletions
|
@ -13,7 +13,7 @@ end
|
|||
---@alias LazySection {title:string, filter:fun(plugin:LazyPlugin):boolean?}
|
||||
|
||||
---@type LazySection[]
|
||||
return {
|
||||
local sections = {
|
||||
{
|
||||
filter = function(plugin)
|
||||
return has_task(plugin, function(task)
|
||||
|
@ -47,21 +47,18 @@ return {
|
|||
title = "Breaking Changes",
|
||||
},
|
||||
{
|
||||
---@param plugin LazyPlugin
|
||||
filter = function(plugin)
|
||||
return plugin._.updated and plugin._.updated.from ~= plugin._.updated.to
|
||||
end,
|
||||
title = "Updated",
|
||||
},
|
||||
{
|
||||
---@param plugin LazyPlugin
|
||||
filter = function(plugin)
|
||||
return plugin._.cloned
|
||||
end,
|
||||
title = "Installed",
|
||||
},
|
||||
{
|
||||
---@param plugin LazyPlugin
|
||||
filter = function(plugin)
|
||||
return plugin._.updates
|
||||
end,
|
||||
|
@ -95,14 +92,15 @@ return {
|
|||
},
|
||||
{
|
||||
filter = function(plugin)
|
||||
return plugin._.installed
|
||||
return plugin._.installed and plugin._.cond
|
||||
end,
|
||||
title = "Not Loaded",
|
||||
},
|
||||
{
|
||||
filter = function(plugin)
|
||||
return plugin._.kind == "disabled"
|
||||
return plugin._.kind == "disabled" or not plugin._.cond
|
||||
end,
|
||||
title = "Disabled",
|
||||
},
|
||||
}
|
||||
return sections
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue