Skip to content

Commit 29d6a54

Browse files
committed
chore: fix incompatible check ad-hoc
1 parent f2ebc37 commit 29d6a54

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

modules/nixvim/options/option.nix

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ in {
3030
example = ''"catppuccin"'';
3131
};
3232
theme_toggle = mkOption {
33-
type = let
34-
type = types.listOf generated.ThemeName;
35-
in type // {
36-
name = "list of the 2 string, one of them must be the default theme";
37-
check = list: type.check list && lib.length list == 2;
38-
};
39-
description = "list themes to toggle theme";
33+
type =
34+
types.addCheck
35+
(types.listOf generated.ThemeName)
36+
(value: lib.length value == 2);
37+
description = "list themes to toggle theme (must be 2 items)";
4038
apply = value:
4139
lib.take 2 value;
4240
default = [ cfg.config.base46.theme cfg.config.base46.second_theme ];

0 commit comments

Comments
 (0)