{ ... }: let t = text: { inherit text; }; i = jump: text: { inherit jump text; }; c = jump: nodes: { inherit jump nodes; }; in { plugins.snippet.luasnip.snippetGroups = [ { filetype = "nix"; snippets = { "if".nodes = [ (t "if ") (i 1 "condition") (t " then ") (i 2 "trueBody") (t " else ") (i 3 "falseBody") (t ";") ]; "var".nodes = [ (i 1 "name") (t " = ") (c 2 [ (i null "value") { snippet.nodes = [ { insert = 1; } (t "[") { insert = 2; } (t "]") ]; } { snippet.nodes = [ { insert = 1; } (t "{") { insert = 2; } (t "}") ]; } ]) (t ";") ]; }; } ]; }