1
0
Fork 0

Use a function node to call a function

This commit is contained in:
Daniele Tricoli 2022-03-12 19:42:02 +01:00
parent cfab3bcdfe
commit 5a033ea133
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ local ls = require "luasnip"
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
function date_rfc3339()
local cmd = assert(io.popen "/usr/bin/date --rfc-3339=seconds")
@ -15,7 +16,7 @@ ls.snippets = {
s({ trig = "zolan", dscr = "Create a new zola entry" }, {
t({ "+++", "draft = true" }),
t({ "", "date = " }),
t(date_rfc3339()),
f(date_rfc3339, {}, {}),
t({ "", 'title = "' }),
i(1),
t '"',