mirror of https://github.com/folke/lazy.nvim.git
fix(spec): show error when users load a plugins module called `lazy`
This commit is contained in:
parent
953c2791d8
commit
1fd80159d0
|
@ -158,6 +158,9 @@ end
|
||||||
|
|
||||||
---@param spec LazySpecImport
|
---@param spec LazySpecImport
|
||||||
function Spec:import(spec)
|
function Spec:import(spec)
|
||||||
|
if spec.import == "lazy" then
|
||||||
|
return self:error("You can't name your plugins module `lazy`.")
|
||||||
|
end
|
||||||
if spec.enabled == false or (type(spec.enabled) == "function" and not spec.enabled()) then
|
if spec.enabled == false or (type(spec.enabled) == "function" and not spec.enabled()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue