plugins/codeium-vim: fix keymaps

This commit is contained in:
Gaetan Lepage 2024-03-21 14:17:18 +01:00 committed by Gaétan Lepage
parent 848543d527
commit 40a4f5ef67

View file

@ -10,27 +10,27 @@ with lib; let
clear = { clear = {
default = "<C-]>"; default = "<C-]>";
description = "Keymap for clearing current suggestion."; description = "Keymap for clearing current suggestion.";
command = "codeium#Clear()"; command = "vim.fn['codeium#Clear']()";
}; };
next = { next = {
default = "<M-]>"; default = "<M-]>";
description = "Keymap for cycling to the next suggestion."; description = "Keymap for cycling to the next suggestion.";
command = "codeium#CycleCompletions(1)"; command = "vim.fn['codeium#CycleCompletions'](1)";
}; };
prev = { prev = {
default = "<M-[>"; default = "<M-[>";
description = "Keymap for cycling to the previous suggestion."; description = "Keymap for cycling to the previous suggestion.";
command = "codeium#CycleCompletions(-1)"; command = "vim.fn['codeium#CycleCompletions'](-1)";
}; };
accept = { accept = {
default = "<Tab>"; default = "<Tab>";
description = "Keymap for inserting the proposed suggestion."; description = "Keymap for inserting the proposed suggestion.";
command = "codeium#Accept()"; command = "vim.fn['codeium#Accept']()";
}; };
complete = { complete = {
default = "<M-Bslash>"; default = "<M-Bslash>";
description = "Keymap for manually triggering the suggestion."; description = "Keymap for manually triggering the suggestion.";
command = "codeium#Complete()"; command = "vim.fn['codeium#Complete']()";
}; };
}; };
in in
@ -129,7 +129,8 @@ in
key = v; key = v;
action = let action = let
inherit (keymapsDefinitions.${optionName}) command; inherit (keymapsDefinitions.${optionName}) command;
in "<Cmd>${command}<CR>"; in
helpers.mkRaw "function() ${command} end";
}; };
keymapsList = flatten ( keymapsList = flatten (