From a915557cedb99daeffee018fc93f63f85fd72a55 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 21 May 2024 01:45:23 +0300 Subject: [PATCH] profiles: cosmetic changes --- modules/profiles/recommended.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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";