From 5b15963fb419076464ef9096b0e1046fc1798381 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Wed, 17 Apr 2024 21:56:33 -0400 Subject: [PATCH] nvim: add more typst snippets --- src/.config/nvim/snippets/typst.lua | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/.config/nvim/snippets/typst.lua b/src/.config/nvim/snippets/typst.lua index afccae3..a28b8e9 100644 --- a/src/.config/nvim/snippets/typst.lua +++ b/src/.config/nvim/snippets/typst.lua @@ -5,9 +5,21 @@ return { -------------------------------- -------------------------------- - s({ trig = "ss", desc = "superscript", wordTrig = false }, fmt("^({}) ", { i(1) })), - s({ trig = "qu", desc = "square (qu-artic) exponent", wordTrig = false }, t("^2 ")), - s({ trig = "cub", desc = "cub-ed exponent", wordTrig = false }, t("^3 ")), + s({ trig = "ss", name = "superscript", wordTrig = false }, fmt("^({}) ", { i(1) })), + s({ trig = "qu", name = "square (qu-artic) exponent", wordTrig = false }, t("^2 ")), + s({ trig = "cub", name = "cub-ed exponent", wordTrig = false }, t("^3 ")), + + s({ + trig = "numb", + name = "numbered equation", + wordTrig = false + }, + fmt( + "#numbered_eq()[${}$ <{}>]", + { + i(1, "equation"), + i(2, "label") + })), s({ trig = "link", desc = "labelled link" }, fmt('#link("{}{}")[{}]', { i(1),