diff --git a/modules/profiles/recommended.nix b/modules/profiles/recommended.nix index 39f1791..ec52d62 100644 --- a/modules/profiles/recommended.nix +++ b/modules/profiles/recommended.nix @@ -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; } ] );