From 3bbd206b1d632e0b56aea738a61e51c674e326ea Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 27 Aug 2023 12:26:46 +0200 Subject: Feat(hm/conf/nvim/plugins/luasnip/all): Add snippets for todo comments --- hm/soispha/conf/nvim/plugins/luasnip/lua/snippets/all.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'hm/soispha/conf/nvim/plugins/luasnip/lua/snippets/all.lua') diff --git a/hm/soispha/conf/nvim/plugins/luasnip/lua/snippets/all.lua b/hm/soispha/conf/nvim/plugins/luasnip/lua/snippets/all.lua index 5ce91a87..8e3a409b 100644 --- a/hm/soispha/conf/nvim/plugins/luasnip/lua/snippets/all.lua +++ b/hm/soispha/conf/nvim/plugins/luasnip/lua/snippets/all.lua @@ -47,7 +47,7 @@ if vim.bo.filetype == "tex" then maybe.pair = pair("<", ">", neg, char_count_same) end -local output_table = { +local auto_pairs = { pair("(", ")", neg, char_count_same); pair("{", "}", neg, char_count_same); pair("[", "]", neg, char_count_same); @@ -55,6 +55,15 @@ local output_table = { pair('"', '"', neg, even_count); pair("`", "`", neg, even_count); } -output_table[#output_table + 1] = maybe.pair +auto_pairs[#auto_pairs + 1] = maybe.pair -return output_table +local todo_comments = { + s({ trig = "fix"; }, t("FIXME(@Soispha): ")); + s({ trig = "todo"; }, t("TODO(@Soispha): ")); + s({ trig = "note"; }, t("NOTE(@Soispha): ")); +}; + +-- merge the output tables together +for k, v in pairs(auto_pairs) do todo_comments[k] = v end + +return todo_comments -- cgit 1.4.1