mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
options: add defaultNullOpts.mkRaw
This commit is contained in:
parent
f11a877bcc
commit
ccae4350d0
2 changed files with 14 additions and 1 deletions
|
@ -147,6 +147,19 @@ rec {
|
|||
mkLuaFn' = args: mkNullOrLuaFn' (processDefaultNullArgs args);
|
||||
mkLuaFn = pluginDefault: description: mkLuaFn' { inherit pluginDefault description; };
|
||||
|
||||
mkRaw' =
|
||||
args:
|
||||
mkNullable' (
|
||||
args
|
||||
// {
|
||||
type = types.rawLua;
|
||||
}
|
||||
// lib.optionalAttrs (args ? pluginDefault) {
|
||||
pluginDefault = lib.nixvim.mkRaw args.pluginDefault;
|
||||
}
|
||||
);
|
||||
mkRaw = pluginDefault: description: mkRaw' { inherit pluginDefault description; };
|
||||
|
||||
mkNum' = args: mkNullableWithRaw' (args // { type = types.number; });
|
||||
mkNum = pluginDefault: description: mkNum' { inherit pluginDefault description; };
|
||||
mkInt' = args: mkNullableWithRaw' (args // { type = types.int; });
|
||||
|
|
|
@ -140,7 +140,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
|||
Keys to use to dismiss the popup.
|
||||
'';
|
||||
|
||||
override_function = defaultNullOpts.mkNullable types.rawLua { __raw = "function(_) end"; } ''
|
||||
override_function = defaultNullOpts.mkRaw "function(_) end" ''
|
||||
Override function to map keys to actions.
|
||||
|
||||
```lua
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue