nvim-config

Log | Files | Refs | Submodules | README

commit 40229aa884b52b5176e9e8607910f8b773a14b4d
parent 35bf6f6cca74dc42fc385ca9b1df18638db5cbf0
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date:   Fri, 20 May 2022 08:43:23 +0200

feat: enable snips in gitcommit

Diffstat:
Mlua/completree-config.lua | 16++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/lua/completree-config.lua b/lua/completree-config.lua @@ -60,6 +60,7 @@ comp.setup { -- For git commit and text only do luasnip NeogitCommitMessage = cdef.luasnip, + gitcommit = cdef.luasnip, text = cdef.luasnip, markdown = md_complete } @@ -117,19 +118,22 @@ local comment_tag = (function() end end)() -ls.snippets = { - all = { - s("todo", { d(1, comment_tag, {}, "TODO") }), - s("fixme", { d(1, comment_tag, {}, "FIXME") }), - }, - NeogitCommitMessage = { +local gitcommit_snips = { s({ trig = "coauth", name = "Co Author", dscr = "A git co-author"}, { t "Co-authored-by: ", i(1, "name"), t" <", i(2, "email"), t">" }), s({ trig = "fix", name = "Fix message", dscr = "Fix without scope or breaking" }, convcommit_snippet"fix"), s({ trig = "feat", name = "Feature message", dscr = "Feature without scope or breaking" }, convcommit_snippet"feat"), s({ trig = "chore", name = "Chore change", dscr = "An update or whatever" }, convcommit_snippet "chore") + } + +ls.snippets = { + all = { + s("todo", { d(1, comment_tag, {}, "TODO") }), + s("fixme", { d(1, comment_tag, {}, "FIXME") }), }, + NeogitCommitMessage = gitcommit_snips, + gitcommit = gitcommit_snips, text = { s({ trig = "ts", dscr = "Tree-sitter test case"}, { t { "", "=====================", ""},