modules/keymaps: remove possibility to add a keymap without an action

This commit is contained in:
Gaetan Lepage 2023-10-16 11:03:04 +02:00 committed by Gaétan Lepage
parent 0de47ebf77
commit 7f29aade86
2 changed files with 5 additions and 13 deletions

View file

@ -83,7 +83,6 @@ in rec {
defaultMode ? "",
withKeyOpt ? true,
flatConfig ? false,
actionIsOptional ? false,
}:
with types;
either
@ -113,14 +112,10 @@ in rec {
example = ["n" "v"];
};
action =
if actionIsOptional
then helpers.mkNullOrOption str "The action to execute"
else
mkOption {
type = str;
description = "The action to execute.";
};
action = mkOption {
type = str;
description = "The action to execute.";
};
lua = mkOption {
type = bool;

View file

@ -26,7 +26,6 @@ in {
defaultMode = modeProps.short;
withKeyOpt = false;
flatConfig = true;
actionIsOptional = config.plugins.which-key.enable;
}
)
);
@ -38,9 +37,7 @@ in {
keymaps = mkOption {
type =
types.listOf
(helpers.keymaps.mkMapOptionSubmodule {
actionIsOptional = config.plugins.which-key.enable;
});
(helpers.keymaps.mkMapOptionSubmodule {});
default = [];
example = [
{