mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix(spec): show error when users load a plugins module called lazy
This commit is contained in:
parent
953c2791d8
commit
1fd80159d0
1 changed files with 3 additions and 0 deletions
|
@ -158,6 +158,9 @@ end
|
|||
|
||||
---@param spec LazySpecImport
|
||||
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
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue