treewide: use mkAssertions wherever possible

This commit is contained in:
Gaetan Lepage 2025-01-20 14:23:55 +01:00
parent a7e516b322
commit af6e4b0bad
13 changed files with 63 additions and 72 deletions

View file

@ -118,7 +118,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
settingsExample = { };
extraConfig = cfg: {
assertions =
assertions = lib.nixvim.mkAssertions "colorschemes.palette" (
lib.mapAttrsToList
(
name: defaultPaletteNames:
@ -131,7 +131,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
{
assertion = lib.isString palette -> lib.elem palette allowedPaletteNames;
message = ''
Nixvim (colorschemes.palette): `settings.palettes.${name}` (${palette}") is not part of the allowed ${name} palette names (${lib.concatStringsSep " " allowedPaletteNames}).
`settings.palettes.${name}` (${palette}") is not part of the allowed ${name} palette names (${lib.concatStringsSep " " allowedPaletteNames}).
'';
}
)
@ -150,6 +150,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
"dark"
"bright"
];
};
}
);
};
}