mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +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}
|
||||
'';
|
||||
|
||||
mkNullable' =
|
||||
{ default, description, ... }@args:
|
||||
mkNullOrOption' (
|
||||
args
|
||||
// {
|
||||
default = null;
|
||||
description = mkDesc default description;
|
||||
}
|
||||
);
|
||||
mkNullable =
|
||||
type: default: desc:
|
||||
mkNullOrOption type (mkDesc default desc);
|
||||
type: default: description:
|
||||
mkNullable' { inherit type default description; };
|
||||
|
||||
mkNullableWithRaw = type: mkNullable (nixvimTypes.maybeRaw type);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue