mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-18 08:18:38 +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
|
@ -187,7 +187,7 @@ in {
|
|||
|
||||
height = helpers.defaultNullOpts.mkPositiveInt 5 "Height of the window.";
|
||||
|
||||
onLines = helpers.mkNullOrOption types.str ''
|
||||
onLines = helpers.defaultNullOpts.mkLuaFn "nil" ''
|
||||
A callback which will be called with (multi-line) stderr output.
|
||||
|
||||
e.g., use:
|
||||
|
@ -302,7 +302,7 @@ in {
|
|||
enable
|
||||
height
|
||||
;
|
||||
on_lines = helpers.mkRaw onLines;
|
||||
on_lines = onLines;
|
||||
};
|
||||
inherit lsp3;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue