{ helpers, ... }: { example = { keymaps = [ { key = ","; action = "echo \"test\""; } { mode = [ "n" "s" ]; key = ""; action = "echo \"test\""; } ]; }; mkKeymaps = { keymaps = helpers.keymaps.mkKeymaps { mode = "x"; options.silent = true; } [ { mode = "n"; key = ","; action = "echo \"test\""; } { # raw action using rawType key = ""; action.__raw = "function() print('hello') end"; } { key = ""; action.__raw = "function() print('toto') end"; options.silent = false; } { mode = [ "n" "v" ]; key = ""; action = "bar"; } { mode = "n"; key = ""; action.__raw = "function() end"; options.replace_keycodes = false; } ]; }; mkKeymapsOnEvents = { keymapsOnEvents = { "InsertEnter" = helpers.keymaps.mkKeymaps { mode = "x"; options.silent = true; } [ { mode = "n"; key = ","; action = "echo \"test\""; } { # raw action using rawType key = ""; action.__raw = "function() print('hello') end"; } { key = ""; action.__raw = "function() print('toto') end"; options.silent = false; } { mode = [ "n" "v" ]; key = ""; action = "bar"; } ]; }; }; }