mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 12:56:46 +00:00
feat(plugin)!: cond
is now the same as enabled
, but skips clean
This commit is contained in:
parent
f8611632d0
commit
fbb0bea2db
2 changed files with 31 additions and 13 deletions
|
@ -297,15 +297,8 @@ function M._load(plugin, reason, opts)
|
|||
return Util.error("Plugin " .. plugin.name .. " is not installed")
|
||||
end
|
||||
|
||||
local cond = plugin.cond
|
||||
if cond == nil then
|
||||
cond = Config.options.defaults.cond
|
||||
end
|
||||
if cond ~= nil and not (opts and opts.force) then
|
||||
if cond == false or (type(cond) == "function" and not cond(plugin)) then
|
||||
plugin._.cond = false
|
||||
return
|
||||
end
|
||||
if plugin._.cond == false and not (opts and opts.force) then
|
||||
return
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: assign-type-mismatch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue