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() }),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user