Modules/Neovim: Update latex snippets
This commit is contained in:
@@ -1,3 +1,18 @@
|
|||||||
|
local ls = require("luasnip")
|
||||||
|
local s = ls.snippet
|
||||||
|
local sn = ls.snippet_node
|
||||||
|
local isn = ls.indent_snippet_node
|
||||||
|
local t = ls.text_node
|
||||||
|
local i = ls.insert_node
|
||||||
|
local f = ls.function_node
|
||||||
|
local c = ls.choice_node
|
||||||
|
local d = ls.dynamic_node
|
||||||
|
local r = ls.restore_node
|
||||||
|
local extras = require("luasnip.extras")
|
||||||
|
local rep = extras.rep
|
||||||
|
local fmt = require("luasnip.extras.fmt").fmt
|
||||||
|
local fmta = require("luasnip.extras.fmt").fmta
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- The first list contains manually expanded snippts
|
-- The first list contains manually expanded snippts
|
||||||
--
|
--
|
||||||
@@ -18,7 +33,7 @@ return {
|
|||||||
|
|
||||||
-- \begin{environment}
|
-- \begin{environment}
|
||||||
s(
|
s(
|
||||||
"beg",
|
{ trig = "beg", name = "begin/end", descr = "begin/end environment (generic)" },
|
||||||
fmta(
|
fmta(
|
||||||
[[
|
[[
|
||||||
\begin{<>}
|
\begin{<>}
|
||||||
@@ -28,6 +43,28 @@ return {
|
|||||||
{ i(1), i(0), rep(1) }
|
{ i(1), i(0), rep(1) }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
s(
|
||||||
|
{ trig = "item", name = "itemize", dscr = "bullet points (itemize)" },
|
||||||
|
fmta(
|
||||||
|
[[
|
||||||
|
\begin{itemize}
|
||||||
|
\item <>
|
||||||
|
\end{itemize}
|
||||||
|
]],
|
||||||
|
{ i(0) }
|
||||||
|
)
|
||||||
|
),
|
||||||
|
s(
|
||||||
|
{ trig = "enum", name = "enumerate", dscr = "bullet points (enumerate)" },
|
||||||
|
fmta(
|
||||||
|
[[
|
||||||
|
\begin{enumerate}
|
||||||
|
\item <>
|
||||||
|
\end{enumerate}
|
||||||
|
]],
|
||||||
|
{ i(0) }
|
||||||
|
)
|
||||||
|
),
|
||||||
}, {
|
}, {
|
||||||
-- The second list contains autosnippets
|
-- The second list contains autosnippets
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user