profiles: add recommended keymaps for luasnip

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-20 10:44:23 +03:00
parent 261a1f6eab
commit c38340b046
Signed by: pleshevskiy
GPG Key ID: 17041163DA10A9A2

View File

@ -124,7 +124,24 @@ in
{
mode = "n";
lhs = leader "fg";
rhs = lambda0 (call0 "telescope.extensions.live_grep_args.live_grep_args");
rhs = lambda0 (pipe [
config.plugin.telescope-nvim.var
"extensions"
"live_grep_args"
(call0 "live_grep_args")
]);
}
]
) ++ lib.optionals config.plugins.snippet.luasnip.enable (
let ls = pipe1 config.plugin.luasnip.var; in [
{ mode = "i"; lhs = ctrl "K"; rhs = lambda0 (ls (call0 "expand")); silent = true; }
{ mode = [ "i" "s" ]; lhs = ctrl "L"; rhs = lambda0 (ls (call "jump" 1)); silent = true; }
{ mode = [ "i" "s" ]; lhs = ctrl "H"; rhs = lambda0 (ls (call "jump" (- 1))); silent = true; }
{
mode = [ "i" "s" ];
lhs = ctrl "E";
rhs = lambda0 (if' (ls (call0 "choice_active")) (ls (call "change_choice" 1)));
silent = true;
}
]
);