about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-27 12:26:46 +0200
committerSoispha <soispha@vhack.eu>2023-08-27 12:26:46 +0200
commit3bbd206b1d632e0b56aea738a61e51c674e326ea (patch)
treeafc4bbe3a89ca7801eb40288d8435453da7cacbf
parentFeat(hm/conf/alacritty): Set nightfox/carbonfox as colorscheme (diff)
downloadnixos-config-3bbd206b1d632e0b56aea738a61e51c674e326ea.tar.gz
nixos-config-3bbd206b1d632e0b56aea738a61e51c674e326ea.zip
Feat(hm/conf/nvim/plugins/luasnip/all): Add snippets for todo comments
-rw-r--r--hm/soispha/conf/nvim/plugins/luasnip/lua/snippets/all.lua15
1 files changed, 12 insertions, 3 deletions
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