We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mode
1 parent bd46d89 commit b8c5587Copy full SHA for b8c5587
lib/keymap-helpers.nix
@@ -44,6 +44,15 @@ rec {
44
45
modeEnum = lib.types.enum modes;
46
47
+ modeType =
48
+ with lib.types;
49
+ either modeEnum (nonEmptyListOf modeEnum)
50
+ // {
51
+ description =
52
+ "one of or non-empty list of" + lib.strings.removePrefix "one of" modeEnum.description;
53
+ descriptionClass = "conjunction";
54
+ };
55
+
56
mapOptionSubmodule = mkMapOptionSubmodule { };
57
58
# NOTE: options that have the deprecated `lua` sub-option must use `removeDeprecatedMapAttrs`
@@ -55,7 +64,7 @@ rec {
64
mkModeOption =
65
default:
66
lib.mkOption {
- type = with lib.types; either modeEnum (listOf modeEnum);
67
+ type = modeType;
59
68
description = ''
60
69
One or several modes.
61
70
Use the short-names (`"n"`, `"v"`, ...).
0 commit comments