From ca69464e5a62e0af3decd727d73ae4417b9ca0c1 Mon Sep 17 00:00:00 2001 From: arne314 <73391160+arne314@users.noreply.github.com> Date: Sun, 22 Dec 2024 18:58:17 +0100 Subject: [PATCH] minor: update snippets --- lua/typstar/snippets/letters.lua | 2 +- lua/typstar/snippets/math.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/typstar/snippets/letters.lua b/lua/typstar/snippets/letters.lua index 0582d3c..dba0129 100644 --- a/lua/typstar/snippets/letters.lua +++ b/lua/typstar/snippets/letters.lua @@ -36,7 +36,7 @@ local greek_letters_map = { local greek_letters = {} local greek_keys = {} local common_indices = { '\\d+', '[i-n]' } -local index_conflicts = { 'in', 'pi', 'xi' } +local index_conflicts = { 'in', 'ln', 'pi', 'xi' } local index_conflicts_set = {} local trigger_greek = '' local trigger_index_pre = '' diff --git a/lua/typstar/snippets/math.lua b/lua/typstar/snippets/math.lua index 2346864..ec01aac 100644 --- a/lua/typstar/snippets/math.lua +++ b/lua/typstar/snippets/math.lua @@ -31,8 +31,8 @@ return { snip('ge', '>>= ', {}, math), -- operators - snip('(.*)sk', '<>+', { cap(1) }, math), - snip('(.*)ak', '<>-', { cap(1) }, math), + snip('ak([^k])', '+<>', { cap(1) }, math, 500, false), + snip('sk([^k])', '-<>', { cap(1) }, math, 500, false), snip('oak', 'plus.circle ', {}, math, 1100), snip('bak', 'plus.square ', {}, math, 1100), snip('mak', 'plus.minus ', {}, math, 1100), @@ -59,6 +59,7 @@ return { snip('mt', '|->> ', {}, math), snip('Oo', 'compose ', {}, math), snip('iso', 'tilde.equiv ', {}, math), + snip('ep', 'exp(<>) ', { i(1, '1') }, math), snip('rrn', 'RR^n ', {}, math), snip('cc', 'cases(\n\t<>\n)\\', { i(1, '1') }, math), snip('(.*)iv', '<>^(-1)', { cap(1) }, math),