summaryrefslogtreecommitdiff
path: root/luasnip
diff options
context:
space:
mode:
authorGravatar Matthew Wozniak <sirtomato999@gmail.com> 2024-01-18 19:30:36 -0500
committerGravatar Matthew Wozniak <sirtomato999@gmail.com> 2024-01-18 19:30:36 -0500
commit31c7bc5258d7323658e60cb5400d5f3457fff74f (patch)
treec078a831c2eb148398428d61259e3e418a83d1fa /luasnip
parentca3ccc842c919e42ff21382a62d23a74e31b39dc (diff)
downloadnvim-31c7bc5258d7323658e60cb5400d5f3457fff74f.tar.gz
nvim-31c7bc5258d7323658e60cb5400d5f3457fff74f.zip
vimtex
Diffstat (limited to 'luasnip')
-rw-r--r--luasnip/all.lua0
-rw-r--r--luasnip/tex.lua30
2 files changed, 30 insertions, 0 deletions
diff --git a/luasnip/all.lua b/luasnip/all.lua
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/luasnip/all.lua
diff --git a/luasnip/tex.lua b/luasnip/tex.lua
new file mode 100644
index 0000000..43db0fc
--- /dev/null
+++ b/luasnip/tex.lua
@@ -0,0 +1,30 @@
+return {
+ s({trig="ddx", snippetType="autosnippet"}, { t("\\dv{x}") }),
+ s({trig="dydx", snippetType="autosnippet"}, { t("\\dv{y}{x}") }),
+ s({trig="dv", snippetType="autosnippet"}, fmta("\\dv{<>}{<>}", { i(1), i(2) }) ),
+ s({trig=";t", snippetType="autosnippet"}, { t("\\theta") }),
+ s({trig=";m", snippetType="autosnippet"}, { t("\\mu") }),
+ s({trig=";p", snippetType="autosnippet"}, { t("\\pi") }),
+ s({trig="usepkg", snippetType="autosnippet"}, fmta("\\usepackage{<>}", { i(1) })),
+ s({trig="ff", snippetType="autosnippet"},
+ {
+ t("\\frac{"),
+ i(1), -- insert node 1
+ t("}{"),
+ i(2), -- insert node 2
+ t("}")
+ }
+ ),
+ s({trig="env", snippetType="autosnippet"},
+ fmta("\\begin{<>}\n\t<>\n\\end{<>}",
+ {
+ i(1),
+ i(2),
+ rep(1),
+ }
+ )
+ ),
+ s({trig="lim", snippetType="autosnippet"},
+ fmta("\\lim_{<>\\to<>}", { i(1), i(2) })
+ ),
+}