File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -81,11 +81,14 @@ function M.check_autoload(modname, modpath)
81
81
if plugin and modpath :find (plugin .dir , 1 , true ) == 1 then
82
82
-- we're not interested in loader time, so calculate delta here
83
83
M .stats .autoload .time = M .stats .autoload .time + uv .hrtime () - start
84
- if not plugin ._ .loaded then
85
- if plugin .module == false then
86
- error (" Plugin " .. plugin .name .. " is not loaded and is configured with module=false" )
84
+ -- only autoload when plugins have been loaded
85
+ if # require (" lazy.core.config" ).plugins > 0 then
86
+ if not plugin ._ .loaded then
87
+ if plugin .module == false then
88
+ error (" Plugin " .. plugin .name .. " is not loaded and is configured with module=false" )
89
+ end
90
+ require (" lazy.core.loader" ).load (plugin , { require = modname })
87
91
end
88
- require (" lazy.core.loader" ).load (plugin , { require = modname })
89
92
end
90
93
return true
91
94
end
You can’t perform that action at this time.
0 commit comments