diff --git a/modules/wrapper/lazy/config.nix b/modules/wrapper/lazy/config.nix index 6a9a6ea2..3468d5ec 100644 --- a/modules/wrapper/lazy/config.nix +++ b/modules/wrapper/lazy/config.nix @@ -76,6 +76,7 @@ else mkLuaInline '' function() + ${optionalString (spec.beforeSetup != null) spec.beforeSetup} ${ optionalString (spec.setupModule != null) "require(${toJSON spec.setupModule}).setup(${toLuaObject spec.setupOpts})" diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix index e0dbea85..730bf267 100644 --- a/modules/wrapper/lazy/lazy.nix +++ b/modules/wrapper/lazy/lazy.nix @@ -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 { type = nullOr str; default = null;