mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat(plugin): added support for cond
for imports (#1079)
Co-authored-by: abeldekat <abel@nomail.com>
This commit is contained in:
parent
acda8d29ca
commit
58e954a735
2 changed files with 4 additions and 0 deletions
|
@ -380,6 +380,9 @@ function Spec:import(spec)
|
|||
if vim.tbl_contains(self.modules, spec.import) then
|
||||
return
|
||||
end
|
||||
if spec.cond == false or (type(spec.cond) == "function" and not spec.cond()) then
|
||||
return
|
||||
end
|
||||
if spec.enabled == false or (type(spec.enabled) == "function" and not spec.enabled()) then
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue