mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
lib/options: add mkNullable'
variant
This commit is contained in:
parent
ed56221499
commit
84b2b0d90c
1 changed files with 11 additions and 2 deletions
|
@ -127,9 +127,18 @@ rec {
|
||||||
${defaultDesc}
|
${defaultDesc}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
mkNullable' =
|
||||||
|
{ default, description, ... }@args:
|
||||||
|
mkNullOrOption' (
|
||||||
|
args
|
||||||
|
// {
|
||||||
|
default = null;
|
||||||
|
description = mkDesc default description;
|
||||||
|
}
|
||||||
|
);
|
||||||
mkNullable =
|
mkNullable =
|
||||||
type: default: desc:
|
type: default: description:
|
||||||
mkNullOrOption type (mkDesc default desc);
|
mkNullable' { inherit type default description; };
|
||||||
|
|
||||||
mkNullableWithRaw = type: mkNullable (nixvimTypes.maybeRaw type);
|
mkNullableWithRaw = type: mkNullable (nixvimTypes.maybeRaw type);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue