feat: allow specifying module to require for plugin configs

This commit is contained in:
Will Hopkins 2023-09-30 16:44:26 -07:00
commit 184a778f8f
No known key found for this signature in database
GPG key ID: 643B8C585BABBB68
3 changed files with 6 additions and 2 deletions

View file

@ -347,6 +347,10 @@ function M.config(plugin)
local opts = Plugin.values(plugin, "opts", false)
plugin.config(plugin, opts)
end
elseif type(plugin.config) == "string" then
fn = function()
require(plugin.config)
end
else
local main = M.get_main(plugin)
if main then