summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-13 19:21:45 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-13 19:21:45 +0100
commit8932e0cde4c5fe232bd79a3380c6a874166b5169 (patch)
treebb5c614a9459f4519fd449881b79eae4cafb8137
parent00c0b481056e98e6c252a7fa8f986a6e6c35f9a6 (diff)
Add snippet to add changelog entries
-rw-r--r--.exrc29
1 files changed, 28 insertions, 1 deletions
diff --git a/.exrc b/.exrc
index 109c044..65e0ff2 100644
--- a/.exrc
+++ b/.exrc
@@ -1,3 +1,30 @@
set tw=80
-nnoremap M :make -j8<CR>
+nnoremap M :make<CR>
+
+lua <<EOF
+local ls = require('luasnip')
+local fmt = require('luasnip.extras.fmt').fmt
+local f = ls.function_node
+local i = ls.insert_node
+local s = ls.s
+
+ls.add_snippets('gsp', {
+s('entry', fmt(
+ [[
+ __entry([<>], [
+ p {-
+ <>
+ }
+ ])
+ ]],
+ {
+ f(function() return os.date('%d-%m-%Y') end),
+ i(0),
+ },
+ {
+ delimiters = '<>',
+ }
+ ))
+})
+EOF