summaryrefslogtreecommitdiffstats
path: root/lua/Snippets/tex/lists.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/Snippets/tex/lists.lua')
-rw-r--r--lua/Snippets/tex/lists.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/lua/Snippets/tex/lists.lua b/lua/Snippets/tex/lists.lua
new file mode 100644
index 0000000..4b998da
--- /dev/null
+++ b/lua/Snippets/tex/lists.lua
@@ -0,0 +1,38 @@
+local tex = require('Snippets.luasniphelperslatex')
+local helper = require('Snippets.luasniphelpers')
+
+return {
+
+ s({ trig = 'nmt', snippetType = 'autosnippet' },
+ fmta(
+ [[
+\begin{enumerate}
+ \item <>
+\end{enumerate}
+]],
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+ s({ trig = 'tmz', snippetType = 'autosnippet' },
+ fmta(
+ [[
+\begin{itemize}
+ \item <>
+\end{itemize}
+]],
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+ s({ trig = 'itm', snippetType = 'autosnippet' },
+ { t('\\item') },
+ { condition = tex.in_enumerate * helper.line_begin + tex.in_itemize * helper.line_begin }
+ ),
+}