mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-03 05:44:31 +02:00
helpers: borderType -> nixvimTypes.border
This commit is contained in:
parent
d88a30fba6
commit
f88ff0a82e
2 changed files with 9 additions and 9 deletions
|
@ -59,13 +59,6 @@ with lib; rec {
|
||||||
|
|
||||||
emptyTable = {"__empty" = null;};
|
emptyTable = {"__empty" = null;};
|
||||||
|
|
||||||
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 {
|
||||||
|
@ -178,7 +171,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
|
nixvimTypes.border
|
||||||
default
|
default
|
||||||
(let
|
(let
|
||||||
defaultDesc = ''
|
defaultDesc = ''
|
||||||
|
@ -381,6 +374,13 @@ with lib; rec {
|
||||||
check = isRawType;
|
check = isRawType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
border = with types;
|
||||||
|
oneOf [
|
||||||
|
str
|
||||||
|
(listOf str)
|
||||||
|
(listOf (listOf str))
|
||||||
|
];
|
||||||
|
|
||||||
highlight = types.submodule {
|
highlight = types.submodule {
|
||||||
# Adds flexibility for other keys
|
# Adds flexibility for other keys
|
||||||
freeformType = types.attrs;
|
freeformType = types.attrs;
|
||||||
|
|
|
@ -95,7 +95,7 @@ with import ../helpers.nix {inherit lib;};
|
||||||
|
|
||||||
Default: `["" "━" "" ""]`
|
Default: `["" "━" "" ""]`
|
||||||
'';
|
'';
|
||||||
type = borderType;
|
type = nixvimTypes.border;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputWinCoverGutter = mkDefaultOpt {
|
outputWinCoverGutter = mkDefaultOpt {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue