diff --git a/.config/nvim/plugin/todo-comments.lua b/.config/nvim/plugin/todo-comments.lua index 9401abd4..c1a19037 100644 --- a/.config/nvim/plugin/todo-comments.lua +++ b/.config/nvim/plugin/todo-comments.lua @@ -1,3 +1,9 @@ +local highlightPat = [[.*<(KEYWORDS)\s*:]] +local highlightPatMe = [[.*<(KEYWORDS)\(leana8959\):]] + +local searchPat = [[\b(KEYWORDS):]] +local searchPatMe = [[\b(KEYWORDS)\(leana8959\):]] + require("todo-comments").setup { keywords = { FIX = { icon = " ", color = "error", alt = { "FIXME", "BUG", "FIXIT", "ISSUE" } }, @@ -14,6 +20,24 @@ require("todo-comments").setup { info = { "#696c77" }, hint = { "#696c77" }, }, + highlight = { + pattern = { highlightPat, highlightPatMe }, + }, + search = { + command = "rg", + args = { + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--hidden", -- search hidden files + -- ignore git + "--glob", + "!**/.git/*", + }, + pattern = searchPat .. "|" .. searchPatMe, + }, } -- Todo-Comments