2024-01-24 17:47:35 +00:00
|
|
|
|
local ls = require('luasnip')
|
|
|
|
|
|
|
|
|
|
local s = ls.snippet
|
|
|
|
|
local t = ls.text_node
|
|
|
|
|
|
|
|
|
|
return {
|
2024-01-25 20:32:46 +00:00
|
|
|
|
-- Superscripts
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^+]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁺')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^-]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁻')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^0]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁰')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^1]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('¹')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^2]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('²')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^3]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('³')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^4]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁴')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^5]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁵')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^6]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁶')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^7]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁷')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^8]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁸')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\^9]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('⁹')
|
|
|
|
|
),
|
|
|
|
|
|
2024-01-24 22:46:03 +00:00
|
|
|
|
-- Subscripts
|
2024-01-25 20:32:46 +00:00
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_+]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('₊')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_-]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('₋')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_0]], wordTrig = false },
|
2024-01-25 20:32:46 +00:00
|
|
|
|
t('₀')
|
|
|
|
|
),
|
2024-01-24 17:47:35 +00:00
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_1]], wordTrig = false },
|
2024-01-24 17:47:35 +00:00
|
|
|
|
t('₁')
|
2024-01-24 22:46:03 +00:00
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_2]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('₂')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_3]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('₃')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_4]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('₄')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_5]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('₅')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_6]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('₆')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_7]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('₇')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_8]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('₈')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_9]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('₉')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_a]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('ₐ')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_i]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('ᵢ')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_j]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('ⱼ')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_k]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('ₖ')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_m]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('ₘ')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\_n]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('ₙ')
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
-- Lists
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\.]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('·')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\circ]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('∘')
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
-- Arrows
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\d]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('↓')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\l]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('←')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\lr]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('↔')
|
|
|
|
|
),
|
2024-01-26 00:47:12 +00:00
|
|
|
|
s(
|
|
|
|
|
{ trig = [[←r]], wordTrig = false },
|
|
|
|
|
t('↔')
|
|
|
|
|
),
|
2024-01-24 22:46:03 +00:00
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\r]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('→')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\u]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('↑')
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
-- Greek letters
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\a]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('α')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\b]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('β')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\g]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('γ')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\e]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('ε')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\pi]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('π')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\s]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('σ')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\z]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('ζ')
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
-- Other operators
|
|
|
|
|
s(
|
2024-01-26 00:47:12 +00:00
|
|
|
|
{ trig = [[\not]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('¬')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\and]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('∧')
|
|
|
|
|
),
|
2024-01-26 00:47:12 +00:00
|
|
|
|
s(
|
|
|
|
|
{ trig = [[αnd]], wordTrig = false },
|
|
|
|
|
t('∧')
|
|
|
|
|
),
|
2024-01-24 22:46:03 +00:00
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\or]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('∨')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\iff]], wordTrig = false },
|
|
|
|
|
t('⇔')
|
2024-01-24 22:46:03 +00:00
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\imp]], wordTrig = false },
|
|
|
|
|
t('⇒')
|
2024-01-24 22:46:03 +00:00
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\cap]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('∩')
|
|
|
|
|
),
|
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\cup]], wordTrig = false },
|
2024-01-24 22:46:03 +00:00
|
|
|
|
t('∪')
|
|
|
|
|
),
|
2024-01-24 23:08:33 +00:00
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\leq]], wordTrig = false },
|
2024-01-24 23:08:33 +00:00
|
|
|
|
t('≤')
|
|
|
|
|
),
|
2024-01-26 00:47:12 +00:00
|
|
|
|
s(
|
|
|
|
|
{ trig = [[←eq]], wordTrig = false },
|
|
|
|
|
t('≤')
|
|
|
|
|
),
|
2024-01-24 23:08:33 +00:00
|
|
|
|
s(
|
2024-01-25 23:30:55 +00:00
|
|
|
|
{ trig = [[\geq]], wordTrig = false },
|
2024-01-24 23:08:33 +00:00
|
|
|
|
t('≥')
|
|
|
|
|
),
|
2024-01-26 00:47:12 +00:00
|
|
|
|
s(
|
|
|
|
|
{ trig = [[γeq]], wordTrig = false },
|
|
|
|
|
t('≥')
|
|
|
|
|
),
|
2024-01-25 23:30:55 +00:00
|
|
|
|
s(
|
|
|
|
|
{ trig = [[\in]], wordTrig = false },
|
|
|
|
|
t('∈')
|
|
|
|
|
),
|
|
|
|
|
s(
|
|
|
|
|
{ trig = [[\notin]], wordTrig = false },
|
|
|
|
|
t('∉')
|
|
|
|
|
),
|
2024-01-26 00:47:12 +00:00
|
|
|
|
s(
|
|
|
|
|
{ trig = [[¬in]], wordTrig = false },
|
|
|
|
|
t('∉')
|
|
|
|
|
),
|
2024-01-24 17:47:35 +00:00
|
|
|
|
}
|