diff options
| author | Nanderty <psopka@sopka.ch> | 2023-03-26 16:04:40 +0200 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2023-03-26 16:04:40 +0200 |
| commit | ef44657937474145403c2b441b862035914d6a44 (patch) | |
| tree | cefeca8f30c2b8b16dd7b7ed877310a0f181fba0 /lua/Snippets/tex/environments.lua | |
| parent | 063c2d97218cdabe0634054a8038cd6b5c9a9a12 (diff) | |
| download | neovim-config-ef44657937474145403c2b441b862035914d6a44.tar.gz neovim-config-ef44657937474145403c2b441b862035914d6a44.tar.bz2 neovim-config-ef44657937474145403c2b441b862035914d6a44.zip | |
Snippets
Diffstat (limited to 'lua/Snippets/tex/environments.lua')
| -rw-r--r-- | lua/Snippets/tex/environments.lua | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/lua/Snippets/tex/environments.lua b/lua/Snippets/tex/environments.lua new file mode 100644 index 0000000..fd19387 --- /dev/null +++ b/lua/Snippets/tex/environments.lua @@ -0,0 +1,49 @@ +local helper = require('Snippets.luasniphelpers') +local helper = require('Snippets.luasniphelpers') + +return { + -- variable environment + s({ trig = 'beg', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{<>} + <> +\end{<>} +]], + { + i(1), + i(2), + rep(1), + } + ), + { condition = helper.line_begin } + ), + -- enumerate environment + s({ trig = 'enu', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{enumerate*} + \item <> +\end{enumerate*} +]], + { + i(1), + } + ), + { condition = helper.line_begin } + ), + -- align environment + s({ trig = 'ali', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{align*} + <> +\end{align*} +]], + { + i(1), + } + ), + { condition = helper.line_begin } + ), +} |
