diff --git a/src/.config/nvim/snippets/typst.lua b/src/.config/nvim/snippets/typst.lua index a28b8e9..4ff5dc7 100644 --- a/src/.config/nvim/snippets/typst.lua +++ b/src/.config/nvim/snippets/typst.lua @@ -5,9 +5,9 @@ return { -------------------------------- -------------------------------- - 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 = "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", @@ -34,6 +34,31 @@ return { i(2), })), + s({ + trig = "qty", + name = "quantity + unit", + wordTrig = false + }, + fmt( + [[#qty("{}", "{}")]], + { + i(1, "numb"), + i(2, "unit") + })), + + s({ + trig = "pq", + name = "percentage error quantity", + wordTrig = false + }, + fmt( + [[#pq("{}", "{}", "{}")]], + { + i(1, "numb"), + i(2, "unit"), + i(3, "percentage error"), + })), + -------------------------------- -------------------------------- -- figures