mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-23 12:15:26 +02:00
plugins: Introduce helpers.defaultNullOpts.mkLuaFn (#855)
This allows to avoid calling `mkRaw` on lua functions, as they will get applied automatically. This could also help in the future to refactor the use of Lua code to make it more user-friendly.
This commit is contained in:
parent
b38dbdb0dc
commit
1d8e7906c9
30 changed files with 140 additions and 119 deletions
|
@ -71,11 +71,11 @@ in {
|
|||
trace = "✎";
|
||||
};
|
||||
|
||||
onOpen = helpers.mkNullOrOption types.str ''
|
||||
onOpen = helpers.defaultNullOpts.mkLuaFn "nil" ''
|
||||
Function called when a new window is opened, use for changing win settings/config.
|
||||
'';
|
||||
|
||||
onClose = helpers.mkNullOrOption types.str ''
|
||||
onClose = helpers.defaultNullOpts.mkLuaFn "nil" ''
|
||||
Function called when a new window is closed.
|
||||
'';
|
||||
|
||||
|
@ -130,8 +130,8 @@ in {
|
|||
}
|
||||
)
|
||||
icons;
|
||||
on_open = helpers.mkRaw onOpen;
|
||||
on_close = helpers.mkRaw onClose;
|
||||
on_open = onOpen;
|
||||
on_close = onClose;
|
||||
inherit render;
|
||||
minimum_width = minimumWidth;
|
||||
inherit fps;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue