Merge pull request #500 from diniamo/lazy-before-setup

wrapper/lazy: add beforeSetup option
This commit is contained in:
raf 2024-12-21 08:17:41 +03:00 committed by GitHub
commit 8bab0497fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -76,6 +76,7 @@
else else
mkLuaInline '' mkLuaInline ''
function() function()
${optionalString (spec.beforeSetup != null) spec.beforeSetup}
${ ${
optionalString (spec.setupModule != null) optionalString (spec.setupModule != null)
"require(${toJSON spec.setupModule}).setup(${toLuaObject spec.setupOpts})" "require(${toJSON spec.setupModule}).setup(${toLuaObject spec.setupOpts})"

View file

@ -74,6 +74,15 @@
''; '';
}; };
beforeSetup = mkOption {
type = nullOr lines;
default = null;
description = ''
Lua code to run after the plugin is loaded, but before the setup
function is called.
'';
};
setupModule = mkOption { setupModule = mkOption {
type = nullOr str; type = nullOr str;
default = null; default = null;