From a75b85e44675caa61a3743e800c88803df9dd43e Mon Sep 17 00:00:00 2001 From: arne314 <73391160+arne314@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:28:19 +0100 Subject: [PATCH] feat(snip): add basic "physics" snippets --- lua/typstar/snippets/math.lua | 1 + lua/typstar/snippets/visual.lua | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lua/typstar/snippets/math.lua b/lua/typstar/snippets/math.lua index 3afbf54..fa970d6 100644 --- a/lua/typstar/snippets/math.lua +++ b/lua/typstar/snippets/math.lua @@ -74,6 +74,7 @@ return { snip('mt', '|->> ', {}, math), snip('cp', 'compose ', {}, math), snip('iso', 'tilde.equiv ', {}, math), + snip('nab', 'nabla ', {}, math), snip('cc', 'cases(\n\t<>\n)\\', { i(1, '1') }, math), snip('([A-Za-z])o([A-Za-z0-9]) ', '<>(<>) ', { cap(1), cap(2) }, math, 100, { maxTrigLength = 4, diff --git a/lua/typstar/snippets/visual.lua b/lua/typstar/snippets/visual.lua index f5644f4..8017891 100644 --- a/lua/typstar/snippets/visual.lua +++ b/lua/typstar/snippets/visual.lua @@ -37,9 +37,11 @@ local operations = { -- first boolean: existing brackets should be kept; second { 'ht', 'hat', '', true, true }, { 'br', 'macron', '', true, true }, { 'dt', 'dot', '', true, true }, + { 'dia', 'diaer', '', true, true }, { 'ci', 'circle', '', true, true }, { 'td', 'tilde', '', true, true }, { 'nr', 'norm', '', true, true }, + { 'arr', 'arrow', '', true, true }, { 'vv', 'vec', '', true, true }, { 'rt', 'sqrt', '', true, true }, { 'flo', 'floor', '', true, true },