From ad5bc143beb3953cec57ddef74ad7c7791f504b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 21 Apr 2025 23:32:03 +0200 Subject: [PATCH] nvim: update typst diary entry function --- .config/nvim/after/plugin/cmp.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.config/nvim/after/plugin/cmp.lua b/.config/nvim/after/plugin/cmp.lua index 3c961ba9..082223b4 100644 --- a/.config/nvim/after/plugin/cmp.lua +++ b/.config/nvim/after/plugin/cmp.lua @@ -41,15 +41,13 @@ ls.setup { update_events = { "TextChanged", "TextChangedI" } } ----------- -- Typst -- ----------- -local function show_date_typst_entry() - return os.date("(year: %Y, month: %m, day: %d, hour: %H, minute: %M, second: %S)") -end +local function show_date_typst_entry() return os.date('"%Y-%m-%d %H:%M:%S"') end ls.add_snippets("typst", { s("entry", { t("#entry("), f(show_date_typst_entry), t { ")[", "" }, - i(0), + t(" "), i(0), t { "", "]" }, }), s("lang", {