From b3ca52110ff60a3643a65c931f1f9f62940481b7 Mon Sep 17 00:00:00 2001 From: traxys Date: Tue, 14 Mar 2023 23:44:14 +0100 Subject: [PATCH] maps: Add the remap option (#256) --- lib/helpers.nix | 4 ++-- modules/keymaps.nix | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/helpers.nix b/lib/helpers.nix index 6f7963c1..9a6ed270 100644 --- a/lib/helpers.nix +++ b/lib/helpers.nix @@ -56,7 +56,7 @@ with lib; rec { action = action; } else { - inherit (action) silent expr unique noremap script nowait; + inherit (action) silent expr unique noremap script nowait remap; action = if action.lua then mkRaw action.action @@ -68,7 +68,7 @@ with lib; rec { (key: action: { action = action.action; config = lib.filterAttrs (_: v: v) { - inherit (action) silent expr unique noremap script nowait; + inherit (action) silent expr unique noremap script nowait remap; }; key = key; mode = mode; diff --git a/modules/keymaps.nix b/modules/keymaps.nix index ea989f5e..e9f584e4 100644 --- a/modules/keymaps.nix +++ b/modules/keymaps.nix @@ -46,6 +46,12 @@ with lib; let default = true; }; + remap = mkOption { + type = types.bool; + description = "Make the mapping recursive. Inverses \"noremap\""; + default = false; + }; + action = mkOption { type = types.str; description = "The action to execute.";