From 7f29aade862273607421cebf44c4c5b32d604d86 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 16 Oct 2023 11:03:04 +0200 Subject: [PATCH] modules/keymaps: remove possibility to add a keymap without an action --- lib/keymap-helpers.nix | 13 ++++--------- modules/keymaps.nix | 5 +---- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/lib/keymap-helpers.nix b/lib/keymap-helpers.nix index 98395c29..34dd1769 100644 --- a/lib/keymap-helpers.nix +++ b/lib/keymap-helpers.nix @@ -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; diff --git a/modules/keymaps.nix b/modules/keymaps.nix index 2577f4b2..e4cf8aff 100644 --- a/modules/keymaps.nix +++ b/modules/keymaps.nix @@ -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 = [ {