modules/keymaps: allow action.__raw

This commit is contained in:
Gaetan Lepage 2024-02-02 23:22:04 +01:00 committed by Gaétan Lepage
parent 7eefcfa5ee
commit 97eed79568
2 changed files with 6 additions and 1 deletions

View file

@ -105,7 +105,7 @@ in rec {
}; };
action = mkOption ({ action = mkOption ({
type = str; type = helpers.nixvimTypes.maybeRaw str;
description = "The action to execute."; description = "The action to execute.";
} }
// ( // (

View file

@ -26,6 +26,11 @@
key = ","; key = ",";
action = "<cmd>echo \"test\"<cr>"; action = "<cmd>echo \"test\"<cr>";
} }
{
# raw action using rawType
key = "<C-p>";
action.__raw = "function() print('hello') end";
}
{ {
key = "<C-a>"; key = "<C-a>";
action = "function() print('toto') end"; action = "function() print('toto') end";