@@ -23,12 +23,11 @@ return {
23
23
},
24
24
25
25
-- TODO: This is a todo
26
-
27
26
-- TODO(scope): This is a todo
28
-
29
27
-- TODO (scope): This is a todo
30
-
31
- -- TODO(): This is a todo
28
+ -- WARN(tomg): This is a warning
29
+ -- FIXME: This is a fixme
30
+ -- todo: This is a lowercase todo
32
31
33
32
{ -- Highlight todo, notes, etc in comments
34
33
" folke/todo-comments.nvim" ,
@@ -37,30 +36,33 @@ return {
37
36
dependencies = { " nvim-lua/plenary.nvim" },
38
37
opts = {
39
38
signs = false ,
40
- -- highlight = {
41
- -- pattern = [[\<(KEYWORDS)\s\?(\([-\s[:alnum:]_]*\))\?:]], -- FIXME: Not working; getting E55 unmatch \) when run in cmd mode
42
- -- },
39
+ -- TODO: make case-insensitive, `\c` flag doesn't seem to work below
40
+ highlight = {
41
+ -- vimgrep regex, supporting the pattern TODO(name):
42
+ pattern = [[ .*<((KEYWORDS)\s*%(\(.{-1,}\))?):\c]] ,
43
+ },
43
44
search = {
44
- -- args = {
45
- -- "--color=never",
46
- -- "--no-heading",
47
- -- "--with-filename",
48
- -- "--line-number",
49
- -- "--column",
50
- -- "--ignore-case", -- FIXME: doesn't work
51
- -- },
52
- pattern = [[ \b(KEYWORDS)\s*?(\([-\s[:alnum:]_]+\))?:]] ,
45
+ command = " rg" ,
46
+ args = {
47
+ " --color=never" ,
48
+ " --no-heading" ,
49
+ " --with-filename" ,
50
+ " --line-number" ,
51
+ " --column" ,
52
+ " --ignore-case" ,
53
+ },
54
+ -- ripgrep regex, supporting the pattern TODO(name):
55
+ pattern = [[ \b(KEYWORDS)(\(\w*\))*:]] ,
53
56
},
54
57
},
55
58
config = function (_ , opts )
56
59
local todo_comments = require (" todo-comments" )
60
+ todo_comments .setup (opts )
57
61
58
62
-- stylua: ignore start
59
63
vim .keymap .set (" n" , " ]t" , function () todo_comments .jump_next () end , { desc = " Next [T]odo comment" })
60
64
vim .keymap .set (" n" , " [t" , function () todo_comments .jump_prev () end , { desc = " Prev [T]odo comment" })
61
65
-- stylua: ignore end
62
-
63
- todo_comments .setup (opts )
64
66
end ,
65
67
},
66
68
0 commit comments