aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/todo-comments.lua
diff options
context:
space:
mode:
authorben <ben@nagy.contact>2025-01-08 15:45:00 -0800
committerben <ben@nagy.contact>2025-01-08 15:45:00 -0800
commitbb2e30b412c23b76ae876e792398f4926467d962 (patch)
tree4f50f94b7bf50103a61ddbab8a0a30f753918b21 /nvim/lua/plugins/todo-comments.lua
parentec2cc455fed8933a98a8b13bea015dd9c4b6e99a (diff)
added current config
Diffstat (limited to 'nvim/lua/plugins/todo-comments.lua')
-rw-r--r--nvim/lua/plugins/todo-comments.lua54
1 files changed, 54 insertions, 0 deletions
diff --git a/nvim/lua/plugins/todo-comments.lua b/nvim/lua/plugins/todo-comments.lua
new file mode 100644
index 0000000..b62212c
--- /dev/null
+++ b/nvim/lua/plugins/todo-comments.lua
@@ -0,0 +1,54 @@
+-- lua/plugins/todo-comments.lua
+return {
+ "folke/todo-comments.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ event = { "BufReadPost", "BufNewFile" },
+ config = function()
+ require("todo-comments").setup({
+ signs = true,
+ sign_priority = 8,
+
+ keywords = {
+ FIX = {
+ icon = " ",
+ color = "error",
+ alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- keywords that map to FIX
+ },
+ TODO = { icon = " ", color = "info" },
+ HACK = { icon = " ", color = "warning" },
+ WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
+ PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
+ NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
+ TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
+ DEBUG = { icon = "🐛", color = "info"},
+ FIX = { icon = "🔧", color = "#FF00FF"},
+
+ },
+ colors = {
+ error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
+ warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
+ info = { "DiagnosticInfo", "#2563EB" },
+ hint = { "DiagnosticHint", "#10B981" },
+ default = { "Identifier", "#7C3AED" },
+ test = { "Identifier", "#FF00FF" }
+ },
+ highlight = {
+ multiline = true, -- enable multine todo comments
+ }
+
+ })
+
+ -- Add some keymaps for todo-comments
+ vim.keymap.set("n", "]t", function()
+ require("todo-comments").jump_next()
+ end, { desc = "Next todo comment" })
+
+ vim.keymap.set("n", "[t", function()
+ require("todo-comments").jump_prev()
+ end, { desc = "Previous todo comment" })
+
+ -- Search todo comments
+ vim.keymap.set("n", "<leader>cf", ":TodoTelescope<CR>",
+ { desc = "Find todo comments", silent = true })
+ end,
+}