feat(trigger_load): return list of skipped plugins instead of failing (#70)

This commit is contained in:
Marc Jakobi
2024-08-23 09:56:22 +02:00
committed by GitHub
parent d04f490725
commit 9c74d06fdc
4 changed files with 37 additions and 10 deletions
+2 -2
View File
@@ -27,9 +27,9 @@ end
--- Once a plugin has been loaded, it will be removed from all handlers (via `del`).
--- As a result, calling `trigger_load` with a plugin name is stateful and idempotent.
---@overload fun(plugins: lz.n.Plugin | string[] | lz.n.Plugin[] | table<unknown, lz.n.Plugin>)
---@overload fun(plugins: string | string[], opts: lz.n.lookup.Opts)
---@overload fun(plugins: string | string[], opts: lz.n.lookup.Opts): string[]
M.trigger_load = function(plugins, opts)
require("lz.n.loader").load(plugins, function(name)
return require("lz.n.loader").load(plugins, function(name)
return M.lookup(name, opts)
end)
end