From 9c81ac9cf132b69415f2d4c63f7c3cbbb6fa775b Mon Sep 17 00:00:00 2001 From: arne314 <73391160+arne314@users.noreply.github.com> Date: Wed, 27 Aug 2025 18:04:15 +0200 Subject: [PATCH] refactor(snip): remove unnecessary priorities --- lua/typstar/snippets/letters.lua | 2 +- lua/typstar/snippets/math.lua | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lua/typstar/snippets/letters.lua b/lua/typstar/snippets/letters.lua index fba50d8..341314f 100644 --- a/lua/typstar/snippets/letters.lua +++ b/lua/typstar/snippets/letters.lua @@ -131,7 +131,7 @@ return { -- series of numbered letters snip('ot(\\w) ', '1, 2, ..., <> ', { cap(1) }, math, 800), -- 1, 2, ..., n snip('(' .. trigger_index_pre .. ') ot ', '<>_1, <>_2, ... ', { cap(1), cap(1) }, math), -- a_1, a_2, ... - snip('(' .. trigger_index_pre .. ') ot(\\w+) ', '<> ', { d(1, get_series) }, math, 1000, { maxTrigLength = 13 }), -- a_1, a_2, ... a_j or a_1, a_2, a_2, a_3, a_4, a_5 + snip('(' .. trigger_index_pre .. ') ot(\\w+) ', '<> ', { d(1, get_series) }, math, nil, { maxTrigLength = 13 }), -- a_1, a_2, ... a_j or a_1, a_2, a_2, a_3, a_4, a_5 -- misc snip('(' .. trigger_index_pre .. ')bl', 'B_<> (<>) ', { cap(1), i(1, 'x_0') }, math, 100), diff --git a/lua/typstar/snippets/math.lua b/lua/typstar/snippets/math.lua index 542f0c3..b68a9a8 100644 --- a/lua/typstar/snippets/math.lua +++ b/lua/typstar/snippets/math.lua @@ -39,7 +39,7 @@ return { snip('oak', 'plus.circle ', {}, math), snip('bak', 'plus.square ', {}, math), snip('mak', 'plus.minus ', {}, math), - snip('xx', 'times ', {}, math, 900), + snip('xx', 'times ', {}, math), snip('oxx', 'times.circle ', {}, math), snip('bxx', 'times.square ', {}, math), snip('ff', '(<>) / (<>) <>', { i(1, 'a'), i(2, 'b'), i(3) }, math), @@ -55,14 +55,14 @@ return { -- sets -- 'st' to '{<>} in ./visual.lua snip('set', '{<> | <>}', { i(1), i(2) }, math), - snip('es', 'emptyset ', {}, math, 900), + snip('es', 'emptyset ', {}, math), snip('ses', '{emptyset} ', {}, math), snip('sp', 'supset ', {}, math), snip('sb', 'subset ', {}, math), snip('sep', 'supset.eq ', {}, math), snip('seb', 'subset.eq ', {}, math), - snip('nn', 'inter ', {}, math, 900), - snip('uu', 'union ', {}, math, 900), + snip('nn', 'inter ', {}, math), + snip('uu', 'union ', {}, math), snip('bnn', 'inter.big ', {}, math), snip('buu', 'union.big ', {}, math), snip('swo', 'without ', {}, math), @@ -75,22 +75,22 @@ return { 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, - blacklist = { 'bot ', 'cos ', 'cot ', 'dot ', 'log ', 'mod ', 'top ', 'won ', 'xor ' }, + blacklist = { 'bot ', 'cos ', 'cot ', 'dot ', 'log ', 'mod ', 'top ', 'won ', 'xor ' }, }), snip('(K|M|N|Q|R|S|Z)([\\dn]) ', '<><>^<> ', { cap(1), cap(1), cap(2) }, math), - snip('dx', 'dif / (dif <>) ', { i(1, 'x') }, math, 900), + snip('dx', 'dif / (dif <>) ', { i(1, 'x') }, math), snip('ddx', '(dif <>) / (dif <>) ', { i(1, 'f'), i(2, 'x') }, math), - snip('DX', 'diff / (diff <>) ', { i(1, 'x') }, math, 900), + snip('DX', 'diff / (diff <>) ', { i(1, 'x') }, math), snip('DDX', '(diff <>) / (diff <>) ', { i(1, 'f'), i(2, 'x') }, math), snip('part', 'partial ', {}, math, 1600), - snip('it', 'integral ', {}, math, 900), + snip('it', 'integral ', {}, math), snip('int', 'integral_(<>)^(<>) ', { i(1, 'a'), i(2, 'b') }, math), snip('oit', 'integral.cont_(<>) ', { i(1, 'C') }, math), snip('dit', 'integral_(<>) ', { i(1, 'Omega') }, math), - snip('sm', 'sum ', {}, math, 900), + snip('sm', 'sum ', {}, math), snip('sum', 'sum_(<>)^(<>) ', { i(1, 'k=1'), i(2, 'oo') }, math), snip('dsm', 'sum_(<>) ', { i(1, 'Omega') }, math), @@ -105,7 +105,7 @@ return { 'lim<><> ', { cap(2), cap(1) }, math, - 1000, + nil, { maxTrigLength = 25 } ), }