diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-11-13 19:21:45 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-11-13 19:21:45 +0100 |
commit | 8932e0cde4c5fe232bd79a3380c6a874166b5169 (patch) | |
tree | bb5c614a9459f4519fd449881b79eae4cafb8137 | |
parent | 00c0b481056e98e6c252a7fa8f986a6e6c35f9a6 (diff) |
Add snippet to add changelog entries
-rw-r--r-- | .exrc | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -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 |