diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 15025d9..2fbe0d6 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -1286,25 +1286,38 @@ local plugins = { }, { "folke/todo-comments.nvim", - cmd = { "TodoTrouble", "TodoTelescope" }, - event = { "BufReadPre", "BufNewFile" }, + event = { "VeryLazy" }, keys = { { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" }, - { "xt", ':exe ":TodoTrouble cwd=" .. fnameescape(expand("%:p"))', desc = "Todo (Trouble) current file", silent = true }, - { "xT", "TodoTrouble", desc = "Todo (Trouble) in workspace", silent = true }, + { "xt", 'Trouble todo toggle filter = {buf = 0}', desc = "Todo (Trouble) current file", silent = true }, + { "xT", 'Trouble todo toggle', desc = "Todo (Trouble) in workspace", silent = true }, { "st", ':exe ":TodoTelescope cwd=" .. fnameescape(expand("%:p"))', desc = "Todo current file", silent = true }, { "sT", "TodoTelescope", desc = "Todo in workspace", silent = true }, }, opts = { + keywords = { + FIX = { + icon = " ", -- icon used for the sign, and in search results + color = "error", -- can be a hex color, or a named color (see below) + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords + -- signs = false, -- configure signs for some keywords individually + }, + 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" } }, + }, + merge_keywords = false, -- to make sure that the keywords above override the default highlight = { multiline = false, -- rarely useful - pattern = [[.*<(KEYWORDS)\s*(\s|:)]], + pattern = [[.*<(KEYWORDS)>\s*]], keyword = "fg", -- make it less flashy }, search = { pattern = [[\b(KEYWORDS)(\s|:)]], - } + }, }, cond = not_vscode },