Update
This commit is contained in:
@@ -133,22 +133,22 @@ return {
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "\\%)(%a)", regTrig = true, wordTrig = false, snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\) <>", {
|
||||
f(function(_, snip)
|
||||
return snip.captures[1]
|
||||
end),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "\\](%a)", regTrig = true, wordTrig = false, snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\] <>", {
|
||||
f(function(_, snip)
|
||||
return snip.captures[1]
|
||||
end),
|
||||
})
|
||||
),
|
||||
-- s(
|
||||
-- { trig = "\\%)(%a)", regTrig = true, wordTrig = false, snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\) <>", {
|
||||
-- f(function(_, snip)
|
||||
-- return snip.captures[1]
|
||||
-- end),
|
||||
-- })
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "\\](%a)", regTrig = true, wordTrig = false, snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\] <>", {
|
||||
-- f(function(_, snip)
|
||||
-- return snip.captures[1]
|
||||
-- end),
|
||||
-- })
|
||||
-- ),
|
||||
s(
|
||||
{ trig = "lim", regTrig = true, wordTrig = false, snippetType = "autosnippet" },
|
||||
fmta("\\lim_{<>}", {
|
||||
|
||||
@@ -19,121 +19,119 @@ end
|
||||
local tex = require("util.latex")
|
||||
|
||||
return {
|
||||
s(
|
||||
{ trig = "msf", snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\mathsf{<>}", {
|
||||
d(1, get_visual),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "msf", snippetType = "autosnippet" },
|
||||
fmta("\\mathsf{<>}", {
|
||||
i(0),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "bf", snippetType = "autosnippet" },
|
||||
fmta("\\mathbf{<>}", {
|
||||
i(1),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "cal", snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\mathcal{<>}", {
|
||||
d(1, get_visual),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "cal", snippetType = "autosnippet" },
|
||||
fmta("\\mathcal{<>}", {
|
||||
i(0),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "scr", snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\mathscr{<>}", {
|
||||
d(1, get_visual),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "scr", snippetType = "autosnippet" },
|
||||
fmta("\\mathscr{<>}", {
|
||||
i(0),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "mbb", snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\mathbb{<>}", {
|
||||
d(1, get_visual),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "mbb", snippetType = "autosnippet" },
|
||||
fmta("\\mathbb{<>}", {
|
||||
i(0),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "mrm", snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\mathrm{<>}", {
|
||||
d(1, get_visual),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "mrm", snippetType = "autosnippet" },
|
||||
fmta("\\mathrm{<>}", {
|
||||
i(0),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "tit", snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\textit{<>}", {
|
||||
d(1, get_visual),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "tit", snippetType = "autosnippet" },
|
||||
fmta("\\textit{<>}", {
|
||||
i(0),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "ttt", snippetType = "autosnippet" },
|
||||
fmta("\\texttt{<>}", {
|
||||
i(0),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "tbf", snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("\\textbf{<>}", {
|
||||
d(1, get_visual),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "tbf", snippetType = "autosnippet" },
|
||||
fmta("\\textbf{<>}", {
|
||||
i(0),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "qq", snippetType = "autosnippet" },
|
||||
fmta("\\text{<>}", {
|
||||
i(1),
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s({ trig = "CC", snippetType = "autosnippet" },
|
||||
t("\\mathbb{C}"),
|
||||
{ condition = tex.in_mathzone() }),
|
||||
-- s(
|
||||
-- { trig = "msf", snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\mathsf{<>}", {
|
||||
-- d(1, get_visual),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "msf", snippetType = "autosnippet" },
|
||||
-- fmta("\\mathsf{<>}", {
|
||||
-- i(0),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "bf", snippetType = "autosnippet" },
|
||||
-- fmta("\\mathbf{<>}", {
|
||||
-- i(1),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "cal", snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\mathcal{<>}", {
|
||||
-- d(1, get_visual),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "cal", snippetType = "autosnippet" },
|
||||
-- fmta("\\mathcal{<>}", {
|
||||
-- i(0),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "scr", snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\mathscr{<>}", {
|
||||
-- d(1, get_visual),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "scr", snippetType = "autosnippet" },
|
||||
-- fmta("\\mathscr{<>}", {
|
||||
-- i(0),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "mbb", snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\mathbb{<>}", {
|
||||
-- d(1, get_visual),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "mbb", snippetType = "autosnippet" },
|
||||
-- fmta("\\mathbb{<>}", {
|
||||
-- i(0),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "mrm", snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\mathrm{<>}", {
|
||||
-- d(1, get_visual),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "mrm", snippetType = "autosnippet" },
|
||||
-- fmta("\\mathrm{<>}", {
|
||||
-- i(0),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "tit", snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\textit{<>}", {
|
||||
-- d(1, get_visual),
|
||||
-- })
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "tit", snippetType = "autosnippet" },
|
||||
-- fmta("\\textit{<>}", {
|
||||
-- i(0),
|
||||
-- })
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "ttt", snippetType = "autosnippet" },
|
||||
-- fmta("\\texttt{<>}", {
|
||||
-- i(0),
|
||||
-- })
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "tbf", snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("\\textbf{<>}", {
|
||||
-- d(1, get_visual),
|
||||
-- })
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "tbf", snippetType = "autosnippet" },
|
||||
-- fmta("\\textbf{<>}", {
|
||||
-- i(0),
|
||||
-- })
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "qq", snippetType = "autosnippet" },
|
||||
-- fmta("\\text{<>}", {
|
||||
-- i(1),
|
||||
-- }),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
-- s({ trig = "CC", snippetType = "autosnippet" }, t("\\mathbb{C}"), { condition = tex.in_mathzone() }),
|
||||
}
|
||||
|
||||
@@ -83,22 +83,22 @@ return {
|
||||
}),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
s(
|
||||
{ trig = "%)(%a)", regTrig = true, wordTrig = false, snippetType = "autosnippet", priority = 2000 },
|
||||
fmta(") <>", {
|
||||
f(function(_, snip)
|
||||
return snip.captures[1]
|
||||
end),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "](%a)", regTrig = true, wordTrig = false, snippetType = "autosnippet", priority = 2000 },
|
||||
fmta("] <>", {
|
||||
f(function(_, snip)
|
||||
return snip.captures[1]
|
||||
end),
|
||||
})
|
||||
),
|
||||
-- s(
|
||||
-- { trig = "%)(%a)", regTrig = true, wordTrig = false, snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta(") <>", {
|
||||
-- f(function(_, snip)
|
||||
-- return snip.captures[1]
|
||||
-- end),
|
||||
-- })
|
||||
-- ),
|
||||
-- s(
|
||||
-- { trig = "](%a)", regTrig = true, wordTrig = false, snippetType = "autosnippet", priority = 2000 },
|
||||
-- fmta("] <>", {
|
||||
-- f(function(_, snip)
|
||||
-- return snip.captures[1]
|
||||
-- end),
|
||||
-- })
|
||||
-- ),
|
||||
s(
|
||||
{ trig = "lim", regTrig = true, wordTrig = false, snippetType = "autosnippet" },
|
||||
fmta("lim_(<>)", {
|
||||
|
||||
@@ -43,9 +43,9 @@ return {
|
||||
s({ trig = "eps", snippetType = "autosnippet", wordTrig = false }, {
|
||||
t("epsilon"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s({ trig = "vps", snippetType = "autosnippet", wordTrig = false }, {
|
||||
t("varepsilon"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
-- s({ trig = "vps", snippetType = "autosnippet", wordTrig = false }, {
|
||||
-- t("varepsilon"),
|
||||
-- }, { condition = tex.in_mathzone }),
|
||||
s({ trig = "Eps", snippetType = "autosnippet", wordTrig = false }, {
|
||||
t("Epsilon"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
@@ -148,12 +148,12 @@ return {
|
||||
s({ trig = "Phi", snippetType = "autosnippet", wordTrig = false }, {
|
||||
t("Phi"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s({ trig = "vhi", snippetType = "autosnippet", wordTrig = false }, {
|
||||
t("varphi"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s({ trig = "Vhi", snippetType = "autosnippet", wordTrig = false }, {
|
||||
t("Varphi"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
-- s({ trig = "vhi", snippetType = "autosnippet", wordTrig = false }, {
|
||||
-- t("varphi"),
|
||||
-- }, { condition = tex.in_mathzone }),
|
||||
-- s({ trig = "Vhi", snippetType = "autosnippet", wordTrig = false }, {
|
||||
-- t("Varphi"),
|
||||
-- }, { condition = tex.in_mathzone }),
|
||||
s({ trig = "chi", snippetType = "autosnippet", wordTrig = false }, {
|
||||
t("chi"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
|
||||
@@ -39,8 +39,11 @@ return {
|
||||
s({ trig = "to", wordTrig = false, snippetType = "autosnippet" }, {
|
||||
t("->"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
-- s({ trig = "==", wordTrig = false, snippetType = "autosnippet" }, {
|
||||
-- t("&="),
|
||||
-- }, { condition = tex.in_mathzone }),
|
||||
s({ trig = "iff", wordTrig = false, snippetType = "autosnippet" }, {
|
||||
t("iff"),
|
||||
t("<==>"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s({ trig = "notin", wordTrig = false, snippetType = "autosnippet" }, {
|
||||
t("in.not"),
|
||||
@@ -118,7 +121,7 @@ return {
|
||||
t("subset"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s({ trig = "subset=", wordTrig = false, snippetType = "autosnippet" }, {
|
||||
t("supset.eq"),
|
||||
t("subset.eq"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s({ trig = "sup", wordTrig = false, snippetType = "autosnippet" }, {
|
||||
t("supset"),
|
||||
@@ -162,9 +165,6 @@ return {
|
||||
s({ trig = "hbar", wordTrig = false, snippetType = "autosnippet", priority = 1500 }, {
|
||||
t("hbar"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s({ trig = "ns", wordTrig = false, snippetType = "autosnippet" }, {
|
||||
t("unlhd"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s({ trig = "eqv", wordTrig = false, snippetType = "autosnippet" }, {
|
||||
t("equiv"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
@@ -201,16 +201,16 @@ return {
|
||||
s({ trig = "cong", snippetType = "autosnippet" }, {
|
||||
t("cong"),
|
||||
}, { condition = tex.in_mathzone }),
|
||||
s(
|
||||
{ trig = "b|", wordTrig = false, snippetType = "autosnippet" },
|
||||
fmta(
|
||||
[[
|
||||
\Big|_(<>)
|
||||
]],
|
||||
{ i(1) }
|
||||
),
|
||||
{ condition = tex.in_mathzone }
|
||||
),
|
||||
-- s(
|
||||
-- { trig = "b|", wordTrig = false, snippetType = "autosnippet" },
|
||||
-- fmta(
|
||||
-- [[
|
||||
-- \Big|_(<>)
|
||||
-- ]],
|
||||
-- { i(1) }
|
||||
-- ),
|
||||
-- { condition = tex.in_mathzone }
|
||||
-- ),
|
||||
s(
|
||||
{ trig = "jo", wordTrig = false, snippetType = "autosnippet" },
|
||||
fmta(
|
||||
|
||||
Reference in New Issue
Block a user