diff --git a/lib/keymap-helpers.nix b/lib/keymap-helpers.nix index 64effebc..0dcbca36 100644 --- a/lib/keymap-helpers.nix +++ b/lib/keymap-helpers.nix @@ -105,7 +105,7 @@ in rec { }; action = mkOption ({ - type = str; + type = helpers.nixvimTypes.maybeRaw str; description = "The action to execute."; } // ( diff --git a/tests/test-sources/modules/keymaps.nix b/tests/test-sources/modules/keymaps.nix index 9afa0de0..de3c1063 100644 --- a/tests/test-sources/modules/keymaps.nix +++ b/tests/test-sources/modules/keymaps.nix @@ -26,6 +26,11 @@ key = ","; action = "echo \"test\""; } + { + # raw action using rawType + key = ""; + action.__raw = "function() print('hello') end"; + } { key = ""; action = "function() print('toto') end";