{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 = "function() print('toto') end"; lua = true; options.silent = false; } { mode = ["n" "v"]; key = ""; action = "bar"; } ]; }; 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 = "function() print('toto') end"; lua = true; options.silent = false; } { mode = ["n" "v"]; key = ""; action = "bar"; } ]; }; }; }