diff options
Diffstat (limited to 'nvim/lua/plugins/todo-comments.lua')
-rw-r--r-- | nvim/lua/plugins/todo-comments.lua | 54 |
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, +} |