modules/keymaps: keymaps option should not accept str mappings

This commit is contained in:
Gaetan Lepage 2023-10-16 11:03:28 +02:00 committed by Gaétan Lepage
parent 7f29aade86
commit 69b3a13532

View file

@ -84,10 +84,8 @@ in rec {
withKeyOpt ? true,
flatConfig ? false,
}:
with types;
either
str
(submodule {
with types; let
mapOptionSubmodule = submodule {
options =
(
if withKeyOpt
@ -133,7 +131,11 @@ in rec {
options = mapConfigOptions;
}
);
});
};
in
if flatConfig
then either str mapOptionSubmodule
else mapOptionSubmodule;
# Correctly merge two attrs (partially) representing a mapping.
mergeKeymap = defaults: keymap: let