1

Neovim: Add sample LaTeX snippet

This commit is contained in:
2024-10-11 13:48:08 +02:00
parent 60821e364a
commit de686ede96
2 changed files with 44 additions and 3 deletions

View File

@ -0,0 +1,33 @@
return {
-- The first list contains manually expanded snippts
--
-- The fmta function accepts a string ([[]] denote multiline strings) and node table.
-- The node table entry order corresponds to the delimiters,
-- the indices denote the jumping order, 0 is jumped to last.
--
-- Example:
-- s("beg", fmta([[
-- \begin{<>}
-- <>
-- \end{<>}]],
-- { i(1), i(0), rep(1) }
-- )),
--
-- The first jumping position (1) fills the \begin{<>} (and \end{<>} because of the repeat).
-- The last jumping position (0) fills the body.
-- \begin{environment}
s(
"beg",
fmta(
[[
\begin{<>}
<>
\end{<>}
]],
{ i(1), i(0), rep(1) }
)
),
}, {
-- The second list contains autosnippets
}