modules/keymaps: factor out helper functions for use in plugins

This commit is contained in:
Gaetan Lepage 2023-10-02 15:44:06 +02:00 committed by Gaétan Lepage
parent 7eb1a85ccb
commit 418bf5da17
6 changed files with 416 additions and 407 deletions

View file

@ -4,7 +4,7 @@
};
legacy-mkMaps = {
maps = helpers.mkMaps {silent = true;} {
maps = helpers.keymaps.mkMaps {silent = true;} {
normal."," = "<cmd>echo \"test\"<cr>";
visual = {
"<C-a>" = {
@ -20,7 +20,7 @@
};
legacy-mkModeMaps = {
maps.normal = helpers.mkModeMaps {silent = true;} {
maps.normal = helpers.keymaps.mkModeMaps {silent = true;} {
"," = "<cmd>echo \"test\"<cr>";
"<C-a>" = {
action = "function() print('toto') end";
@ -49,7 +49,7 @@
mkMaps = {
keymaps =
helpers.mkKeymaps
helpers.keymaps.mkKeymaps
{
mode = "x";
options.silent = true;