diff --git a/modules/profiles/recommended.nix b/modules/profiles/recommended.nix index 9d69c2c..76afbeb 100644 --- a/modules/profiles/recommended.nix +++ b/modules/profiles/recommended.nix @@ -133,10 +133,14 @@ in } ] ) ++ lib.optionals config.plugins.snippet.luasnip.enable ( - let ls = pipe1 config.plugin.luasnip.var; in [ + let + ls = pipe1 config.plugin.luasnip.var; + jump = dir: (if' (ls (call "locally_jumpable" dir)) (ls (call "jump" dir))); + 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 "L"; rhs = lambda0 (jump 1); silent = true; } + { mode = [ "i" "s" ]; lhs = ctrl "H"; rhs = lambda0 (jump (-1)); silent = true; } { mode = [ "i" "s" ]; lhs = ctrl "E";