mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-23 06:09:49 +01:00
wrapper/lazy: add beforeSetup option
Useful for avoiding a million require calls in setupOpts.
This commit is contained in:
parent
99a4eafa34
commit
ed69816f68
2 changed files with 10 additions and 0 deletions
|
@ -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})"
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue