snippets: add a snippet for commit message

- Adds a snippet for commit message to save working hours.
- Remove redundant markdown snippet for the date.
- Improve the markdown snippet for incremental note entry.

Co-Authored-by: iGor milhit <igor@milhit.ch>
iGor milhit 2023-07-08 07:00:16 +02:00
parent e72b364cec
commit d2ebe0e57f
Signed by: igor
GPG Key ID: 692D97C3D0228A99
2 changed files with 36 additions and 14 deletions

View File

@ -0,0 +1,16 @@
local ls = require("luasnip")
local s = ls.snippet
local t = ls.text_node
return {
s(
{
trig = "hr",
name = "Heures",
dscr = "Insert a commit message content for saving the worked hours."
},
{
t("organisation: enregistre les heures")
}
)
}

View File

@ -40,7 +40,7 @@ end
return { return {
s( s(
{ {
trig = "datetime", trig = "dt",
name = "Datetime", name = "Datetime",
dscr = "Insert the current datetime with locale daylight saving." dscr = "Insert the current datetime with locale daylight saving."
}, },
@ -48,16 +48,6 @@ return {
f(get_datetime, {}) f(get_datetime, {})
} }
), ),
s(
{
trig = "date",
name = "Date",
dscr = "Insert the current date."
},
{
f(get_date, {})
}
),
s( s(
{ {
trig = "id", trig = "id",
@ -78,6 +68,23 @@ return {
f(get_day, {}) f(get_day, {})
} }
), ),
s(
{
trig = "ie",
Name = "Inc entry",
dscr = "Insert an Inc entry for today (heading level 2)."
},
fmt(
[[
## {}
]],
{
f(get_day, {})
}
)
),
s( s(
{ {
trig = "fm", trig = "fm",
@ -137,13 +144,12 @@ return {
[[ [[
[{1}][{2}] [{1}][{2}]
[{2}]: {3} "{4}" [{2}]: {3}
]], ]],
{ {
i(1, "Link text"), i(1, "Link text"),
i(2, "Reference"), i(2, "Reference"),
i(3, "Link target"), i(3, "Link target")
i(4, "Title")
}, },
{ repeat_duplicates = true } { repeat_duplicates = true }
) )