We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
cond
1 parent acda8d2 commit 58e954aCopy full SHA for 58e954a
lua/lazy/core/plugin.lua
@@ -380,6 +380,9 @@ function Spec:import(spec)
380
if vim.tbl_contains(self.modules, spec.import) then
381
return
382
end
383
+ if spec.cond == false or (type(spec.cond) == "function" and not spec.cond()) then
384
+ return
385
+ end
386
if spec.enabled == false or (type(spec.enabled) == "function" and not spec.enabled()) then
387
388
lua/lazy/types.lua
@@ -75,3 +75,4 @@
75
---@class LazySpecImport
76
---@field import string spec module to import
77
---@field enabled? boolean|(fun():boolean)
78
+---@field cond? boolean|(fun():boolean)
0 commit comments