2024-05-14 10:09:20 +00:00
|
|
|
local ls = require("luasnip")
|
|
|
|
local s = ls.snippet
|
|
|
|
local sn = ls.snippet_node
|
|
|
|
local t = ls.text_node
|
|
|
|
local i = ls.insert_node
|
|
|
|
local f = ls.function_node
|
|
|
|
local d = ls.dynamic_node
|
|
|
|
local fmt = require("luasnip.extras.fmt").fmt
|
|
|
|
local fmta = require("luasnip.extras.fmt").fmta
|
|
|
|
local rep = require("luasnip.extras").rep
|
|
|
|
|
|
|
|
return {
|
2024-05-14 13:58:36 +00:00
|
|
|
s({ trig = "frame", dscr = "Insert a beamer frame" },
|
2024-05-14 10:09:20 +00:00
|
|
|
fmta(
|
|
|
|
[[
|
|
|
|
\begin{frame}{<>}
|
|
|
|
<>
|
|
|
|
\end{frame}
|
|
|
|
]],
|
|
|
|
{
|
|
|
|
i(1, "title"),
|
|
|
|
i(2, "content")
|
|
|
|
}
|
|
|
|
)
|
|
|
|
),
|
2024-05-14 10:13:11 +00:00
|
|
|
|
2024-05-14 13:58:36 +00:00
|
|
|
s({ trig = "block", dscr = "Insert a beamer block" },
|
2024-05-14 10:13:11 +00:00
|
|
|
fmta(
|
|
|
|
[[
|
|
|
|
\begin{block}{<>}
|
|
|
|
<>
|
|
|
|
\end{block}
|
|
|
|
]],
|
|
|
|
{
|
|
|
|
i(1, "title"),
|
|
|
|
i(2, "content")
|
|
|
|
}
|
|
|
|
)
|
|
|
|
),
|
2024-05-14 13:58:09 +00:00
|
|
|
|
|
|
|
s({ trig = "pp", dscr = "Insert a beamer pause" },
|
|
|
|
fmt("\\pause", {})
|
|
|
|
),
|
|
|
|
|
|
|
|
s({ trig = "ii", dscr = "Insert an item" },
|
|
|
|
fmt("\\item ", {})
|
|
|
|
),
|
2024-05-14 14:00:46 +00:00
|
|
|
|
|
|
|
s({ trig = "ss", dscr = "Insert a small skip" },
|
|
|
|
fmt("\\smallskip", {})
|
|
|
|
),
|
|
|
|
|
|
|
|
s({ trig = "ms", dscr = "Insert a medium skip" },
|
|
|
|
fmt("\\medskip", {})
|
|
|
|
),
|
|
|
|
|
|
|
|
s({ trig = "bs", dscr = "Insert a big skip" },
|
|
|
|
fmt("\\bigskip", {})
|
|
|
|
),
|
2024-05-24 11:21:19 +00:00
|
|
|
|
|
|
|
s({ trig = "tw", dscr = "Insert \\textwidth" },
|
|
|
|
fmt("\\textwidth", {})
|
|
|
|
),
|
|
|
|
|
|
|
|
s({ trig = "th", dscr = "Insert \\textheight" },
|
|
|
|
fmt("\\textheight", {})
|
|
|
|
),
|
2024-05-14 10:09:20 +00:00
|
|
|
}
|