28 lines
541 B
Lua
28 lines
541 B
Lua
local ls = require "luasnip"
|
|
local s = ls.snippet
|
|
local t = ls.text_node
|
|
local i = ls.insert_node
|
|
local f = ls.function_node
|
|
|
|
local util = require "custom.snippets.util"
|
|
|
|
ls.add_snippets("all", {
|
|
s("icd", {
|
|
f(util.today)
|
|
}),
|
|
s("ict", {
|
|
f(util.timestamp)
|
|
}),
|
|
s("шсе", {
|
|
f(util.timestamp)
|
|
}),
|
|
s({ trig = "csection", dscr = "# centered section header #" }, {
|
|
t "#",
|
|
f(util.pad_left(80, 1), { 1 }),
|
|
i(1, "Some topic"),
|
|
f(util.pad_right(80, 1), { 1 }),
|
|
t "#",
|
|
t { "", "" },
|
|
i(0),
|
|
}),
|
|
})
|