diff options
| author | Nanderty <psopka@sopka.ch> | 2023-03-25 18:16:24 +0100 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2023-03-25 18:16:24 +0100 |
| commit | 063c2d97218cdabe0634054a8038cd6b5c9a9a12 (patch) | |
| tree | 768cb00820e92f577fe59253ba07e58f606ced4e /Snippets/tex/environments.lua | |
| parent | af7c85ef9daaf702a179a9b3d66d03eff71db7a6 (diff) | |
| download | neovim-config-063c2d97218cdabe0634054a8038cd6b5c9a9a12.tar.gz neovim-config-063c2d97218cdabe0634054a8038cd6b5c9a9a12.tar.bz2 neovim-config-063c2d97218cdabe0634054a8038cd6b5c9a9a12.zip | |
cleanup, snippets
Diffstat (limited to 'Snippets/tex/environments.lua')
| -rw-r--r-- | Snippets/tex/environments.lua | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Snippets/tex/environments.lua b/Snippets/tex/environments.lua new file mode 100644 index 0000000..b9594aa --- /dev/null +++ b/Snippets/tex/environments.lua @@ -0,0 +1,48 @@ +local line_begin = require("luasnip.extras.expand_conditions").line_begin + +return { + -- variable environment + s({ trig = 'beg', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{<>} + <> +\end{<>} +]], + { + i(1), + i(2), + rep(1), + } + ), + { condition = line_begin } + ), + -- enumerate environment + s({ trig = 'enu', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{enumerate*} + \item <> +\end{enumerate*} +]], + { + i(1), + } + ), + { condition = line_begin } + ), + -- align environment + s({ trig = 'ali', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{align*} + <> +\end{align*} +]], + { + i(1), + } + ), + { condition = line_begin } + ), +} |
