init
This commit is contained in:
commit
1e2ca5a6fc
71 changed files with 3330 additions and 0 deletions
20
config/plugins/luasnip/snippets/tex/EndlessList.lua
Normal file
20
config/plugins/luasnip/snippets/tex/EndlessList.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- https://github.com/L3MON4D3/LuaSnip/wiki/Cool-Snippets#endless-list
|
||||
local rec_ls
|
||||
rec_ls = function()
|
||||
return sn(nil, {
|
||||
c(1, {
|
||||
-- important!! Having the sn(...) as the first choice will cause infinite recursion.
|
||||
t({""}),
|
||||
-- The same dynamicNode as in the snippet (also note: self reference).
|
||||
sn(nil, {t({"", "\t\\item "}), i(1), d(2, rec_ls, {})}),
|
||||
}),
|
||||
});
|
||||
end
|
||||
|
||||
return {
|
||||
s(";endlessitem", {
|
||||
t({"\\begin{itemize}",
|
||||
"\t\\item "}), i(1), d(2, rec_ls, {}),
|
||||
t({"", "\\end{itemize}"}), i(0)
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue