Compare commits

..

No commits in common. "592f9251e55143a716c921eeecd8cb40ec6b70bb" and "881339ef7077b5c1d07041a0024575a4170c0174" have entirely different histories.

2 changed files with 8 additions and 13 deletions

View file

@ -40,17 +40,16 @@ let
config = {
lambda =
let
inherit (builtins) listToAttrs attrValues;
fnArgs = listToAttrs (map (v: { name = v; value = raw v; }) config.args);
fnArgs = builtins.listToAttrs (map (v: { name = v; value = raw v; }) config.args);
innerCfg = config.content fnArgs;
in
lambda config.args (lib.flatten [
innerCfg.extra
# Autocommands
(map (v: v.genConfig) (attrValues innerCfg.vim.augroup))
# Keymaps
(lib.flip map innerCfg.vim.keymap.set ({ mode, lhs, rhs, ... } @ vars:
let m = if builtins.isList mode then lib.head mode else mode; in
let
m = if builtins.isList mode then lib.head mode else mode;
in
if innerCfg.vim.keymap._validate."${m}"."${lhs}" == rhs then vars.genConfig
else abort "This case should never happen."
))

View file

@ -133,14 +133,10 @@ in
}
]
) ++ lib.optionals config.plugins.snippet.luasnip.enable (
let
ls = pipe1 config.plugin.luasnip.var;
jump = dir: (if' (ls (call "locally_jumpable" dir)) (ls (call "jump" dir)));
in
[
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 (jump 1); silent = true; }
{ mode = [ "i" "s" ]; lhs = ctrl "H"; rhs = lambda0 (jump (-1)); 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";