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)
|
local plugin = require("lazy.core.plugin").find(modpath)
|
||||||
if plugin and modpath:find(plugin.dir, 1, true) == 1 then
|
if plugin and modpath:find(plugin.dir, 1, true) == 1 then
|
||||||
if not plugin._.loaded 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 })
|
require("lazy.core.loader").load(plugin, { require = modname })
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue