Update
This commit is contained in:
72
LuaSnip/typst/text.lua
Normal file
72
LuaSnip/typst/text.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
local ls = require("luasnip")
|
||||
local c = ls.choice_node
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local fmta = require("luasnip.extras.fmt").fmta
|
||||
local tex = require("util.latex")
|
||||
local rep = require("luasnip.extras").rep
|
||||
local line_begin = require("luasnip.extras.expand_conditions").line_begin
|
||||
|
||||
return {
|
||||
-- s({ trig = "if", snippetType = "autosnippet" }, {
|
||||
-- t("\\text{\\ if\\ }"),
|
||||
-- }, { condition = tex.in_mathzone }),
|
||||
s({ trig = "wlog", snippetType = "autosnippet" }, {
|
||||
t("without loss of generality"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "Wlog", snippetType = "autosnippet" }, {
|
||||
t("Without loss of generality"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "%%", snippetType = "autosnippet" }, {
|
||||
t("\\%"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "&&", snippetType = "autosnippet" }, {
|
||||
t("\\&"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "##", snippetType = "autosnippet" }, {
|
||||
t("\\#"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "thm", snippetType = "autosnippet" }, {
|
||||
t("theorem"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "propp", snippetType = "autosnippet" }, {
|
||||
t("proposition"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "deff", snippetType = "autosnippet" }, {
|
||||
t("definition"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "exaa", snippetType = "autosnippet" }, {
|
||||
t("example"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "iee", snippetType = "autosnippet" }, {
|
||||
t("i.e."),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "stt", snippetType = "autosnippet" }, {
|
||||
t("such that"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "iff", snippetType = "autosnippet" }, {
|
||||
t("if and only if"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "iso" }, {
|
||||
t("isomorphic"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "iso" }, {
|
||||
t("isomorphism"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "homo" }, {
|
||||
t("homomorphism"),
|
||||
}, { condition = tex.in_text }),
|
||||
s({ trig = "homo" }, {
|
||||
t("homomorphic"),
|
||||
}, { condition = tex.in_text })
|
||||
-- s({ trig = "psp", snippetType = "autosnippet" }, {
|
||||
-- t("\\(p\\)-subgroup"),
|
||||
-- }, { condition = tex.in_text }),
|
||||
-- s({ trig = "pgp", snippetType = "autosnippet" }, {
|
||||
-- t("\\(p\\)-subgroup"),
|
||||
-- }, { condition = tex.in_text }),
|
||||
-- s({ trig = "spsp", snippetType = "autosnippet" }, {
|
||||
-- t("Sylow \\(p\\)-subgroup"),
|
||||
-- }, { condition = tex.in_text }),
|
||||
}
|
||||
Reference in New Issue
Block a user