mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 18:58:43 +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.
|
||||
mkNullOrOption = type: desc:
|
||||
lib.mkOption {
|
||||
|
@ -146,14 +153,7 @@ with lib; rec {
|
|||
mkEnumFirstDefault = enum: mkEnum enum (head enum);
|
||||
mkBorder = default: name: desc:
|
||||
mkNullable
|
||||
(
|
||||
with lib.types;
|
||||
oneOf [
|
||||
str
|
||||
(listOf str)
|
||||
(listOf (listOf str))
|
||||
]
|
||||
)
|
||||
borderType
|
||||
default
|
||||
(let
|
||||
defaultDesc = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue