From c1e58a905bbdddf109dd3b7473edb2e8076d708b Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 3 May 2025 14:28:00 -0700 Subject: current neovim config (lua) --- config/nvim/lua/plugins/todo-comments.lua | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 config/nvim/lua/plugins/todo-comments.lua (limited to 'config/nvim/lua/plugins/todo-comments.lua') diff --git a/config/nvim/lua/plugins/todo-comments.lua b/config/nvim/lua/plugins/todo-comments.lua new file mode 100644 index 0000000..340dbcd --- /dev/null +++ b/config/nvim/lua/plugins/todo-comments.lua @@ -0,0 +1,55 @@ +-- lua/plugins/todo-comments.lua +return { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + event = { "BufReadPost", "BufNewFile" }, + lazy = false, + 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", "cf", ":TodoTelescope", + { desc = "Find todo comments", silent = true }) + end, +} -- cgit v1.2.3