mirror of https://github.com/folke/lazy.nvim.git
fix: dont autoload cached modules when module=false
This commit is contained in:
parent
992c6791ef
commit
316503f124
|
@ -54,6 +54,9 @@ function M.check_path(modname, modpath)
|
|||
local plugin = require("lazy.core.plugin").find(modpath)
|
||||
if plugin and modpath:find(plugin.dir, 1, true) == 1 then
|
||||
if not plugin._.loaded then
|
||||
if plugin.module == false then
|
||||
error("Plugin " .. plugin.name .. " is not loaded and is configured with module=false")
|
||||
end
|
||||
require("lazy.core.loader").load(plugin, { require = modname })
|
||||
end
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue