mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-27 02:59:00 +02:00
helpers: factor out borderType
This commit is contained in:
parent
356e0e855b
commit
707054bf23
1 changed files with 8 additions and 8 deletions
|
@ -91,6 +91,13 @@ with lib; rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
borderType = with lib.types;
|
||||||
|
oneOf [
|
||||||
|
str
|
||||||
|
(listOf str)
|
||||||
|
(listOf (listOf str))
|
||||||
|
];
|
||||||
|
|
||||||
# Creates an option with a nullable type that defaults to null.
|
# Creates an option with a nullable type that defaults to null.
|
||||||
mkNullOrOption = type: desc:
|
mkNullOrOption = type: desc:
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
|
@ -146,14 +153,7 @@ with lib; rec {
|
||||||
mkEnumFirstDefault = enum: mkEnum enum (head enum);
|
mkEnumFirstDefault = enum: mkEnum enum (head enum);
|
||||||
mkBorder = default: name: desc:
|
mkBorder = default: name: desc:
|
||||||
mkNullable
|
mkNullable
|
||||||
(
|
borderType
|
||||||
with lib.types;
|
|
||||||
oneOf [
|
|
||||||
str
|
|
||||||
(listOf str)
|
|
||||||
(listOf (listOf str))
|
|
||||||
]
|
|
||||||
)
|
|
||||||
default
|
default
|
||||||
(let
|
(let
|
||||||
defaultDesc = ''
|
defaultDesc = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue