1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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,
}
|