diff --git a/my_snippets/gitcommit.lua b/my_snippets/gitcommit.lua new file mode 100644 index 0000000..83a2755 --- /dev/null +++ b/my_snippets/gitcommit.lua @@ -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") + } + ) +} diff --git a/my_snippets/markdown.lua b/my_snippets/markdown.lua index 6e919ae..7883817 100644 --- a/my_snippets/markdown.lua +++ b/my_snippets/markdown.lua @@ -40,7 +40,7 @@ end return { s( { - trig = "datetime", + trig = "dt", name = "Datetime", dscr = "Insert the current datetime with locale daylight saving." }, @@ -48,16 +48,6 @@ return { f(get_datetime, {}) } ), - s( - { - trig = "date", - name = "Date", - dscr = "Insert the current date." - }, - { - f(get_date, {}) - } - ), s( { trig = "id", @@ -78,6 +68,23 @@ return { f(get_day, {}) } ), + s( + { + trig = "ie", + Name = "Inc entry", + dscr = "Insert an Inc entry for today (heading level 2)." + }, + fmt( + [[ + ## {} + + + ]], + { + f(get_day, {}) + } + ) + ), s( { trig = "fm", @@ -137,13 +144,12 @@ return { [[ [{1}][{2}] - [{2}]: {3} "{4}" + [{2}]: {3} ]], { i(1, "Link text"), i(2, "Reference"), - i(3, "Link target"), - i(4, "Title") + i(3, "Link target") }, { repeat_duplicates = true } )