mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat: added module=false
to skip auto-loading of plugins on require
This commit is contained in:
parent
55d194cf9c
commit
1efa710210
3 changed files with 5 additions and 1 deletions
|
@ -194,7 +194,7 @@ end
|
|||
function M.autoload(modname)
|
||||
-- check if a lazy plugin should be loaded
|
||||
for _, plugin in pairs(Config.plugins) do
|
||||
if not plugin._.loaded then
|
||||
if not (plugin._.loaded or plugin.module == false) then
|
||||
for _, pattern in ipairs({ ".lua", "/init.lua" }) do
|
||||
local path = plugin.dir .. "/lua/" .. modname:gsub("%.", "/") .. pattern
|
||||
if vim.loop.fs_stat(path) then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue