mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-22 03:35:21 +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
|
@ -50,7 +50,7 @@ in {
|
|||
The Z-index of the context window.
|
||||
'';
|
||||
|
||||
onAttach = helpers.mkNullOrOption types.str ''
|
||||
onAttach = helpers.defaultNullOpts.mkLuaFn "nil" ''
|
||||
The implementation of a lua function which takes an integer `buf` as parameter and returns a
|
||||
boolean.
|
||||
Return `false` to disable attaching.
|
||||
|
@ -70,7 +70,7 @@ in {
|
|||
separator
|
||||
zindex
|
||||
;
|
||||
on_attach = helpers.mkRaw onAttach;
|
||||
on_attach = onAttach;
|
||||
}
|
||||
// cfg.extraOptions;
|
||||
in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue