Removed all the default inserts

This commit is contained in:
2025-11-02 00:49:37 +01:00
parent dc7fa65a80
commit eda6de26bb
3 changed files with 20 additions and 8 deletions

View File

@@ -24,11 +24,11 @@ local ctheorems = {
}
local wrappings = {
{ 'll', '$', '$', '1+1' },
{ 'BLD', '*', '*', 'abc' },
{ 'ITL', '_', '_', 'abc' },
{ 'HIG', '#highlight[', ']', 'abc' },
{ 'UND', '#underline[', ']', 'abc' },
{ 'll', '$', '$', '' },
{ 'BLD', '*', '*', '' },
{ 'ITL', '_', '_', '' },
{ 'HIG', '#highlight[', ']', '' },
{ 'UND', '#underline[', ']', '' },
}
local document_snippets = {}
@@ -51,6 +51,7 @@ return {
helper.list_snip('dm', '\n$\n\t<>\n$ <>', { helper.visual(1), i(2) }, markup, 1100, { prepend = '\t' }),
start('fla', '#flashcard(0)[<>][\n<>\n<>]', { i(1, 'flashcard'), indent_visual(2), cap(1) }, markup),
start('flA', '#flashcard(0, "<>")[\n<>\n<>]', { i(1, 'flashcard'), indent_visual(2), cap(1) }, markup),
start('TAB', '#table(columns: <>,\n[<>], [<>], <>\n)', { i(1), i(2), i(3), i(4) }, markup),
snip('IMP', '$==>>$ ', {}, markup),
snip('IFF', '$<<==>>$ ', {}, markup),
unpack(document_snippets),

View File

@@ -33,6 +33,16 @@ return {
snip('ne', '!= ', {}, math),
snip('ge', '>>= ', {}, math),
-- custom
snip('mm', '- ', {}, math),
snip('pl', '+ ', {}, math),
snip('nl', '\\ \n<>', {i(1)}, math),
snip('pm', '+- ', {}, math),
snip('nx', ', space ', {}, math),
snip('nbx', ', quad ', {}, math),
snip('ta', 'star ', {}, math),
snip('del', 'Delta ', {}, math),
-- operators
snip('ak([^k ])', '+ <>', { cap(1) }, math, 100, { wordTrig = false }),
snip('sk([^k ])', '- <>', { cap(1) }, math, 100, { wordTrig = false }),
@@ -42,7 +52,7 @@ return {
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),
snip('ff', '(<>) / (<>) <>', { i(1), i(2), i(3) }, math),
snip('nab', 'arrow(nabla) ', {}, math),
-- exponents
@@ -74,7 +84,7 @@ return {
snip('mt', '|->> ', {}, math),
snip('Oo', 'compose ', {}, math),
snip('iso', 'tilde.equiv ', {}, math),
snip('cc', 'cases(\n\t<>\n)\\', { i(1, '1') }, math),
snip('cc', 'cases(\n\t<>\n)\\', { i(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 ' },
@@ -88,6 +98,7 @@ return {
snip('part', 'partial ', {}, math, 1600),
snip('it', 'integral ', {}, math),
snip('iot', 'integral.vol ', {}, math),
snip('ift', 'integral.surf ', {}, 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),

View File

@@ -98,7 +98,7 @@ local smart_wrap = function(args, parent, old_state, expand)
-- normal snippet
if not visual_disable_normal[trigger] then
return s(nil, { t(expand1), i(1, '1+1'), t(expand2) })
return s(nil, { t(expand1), i(1), t(expand2) })
else
return s(nil, t(trigger))
end