mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim/todo-comments: better highlighting regex rule
This commit is contained in:
parent
5bb06fbae6
commit
5e96b3d6aa
1 changed files with 24 additions and 0 deletions
|
|
@ -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 {
|
require("todo-comments").setup {
|
||||||
keywords = {
|
keywords = {
|
||||||
FIX = { icon = " ", color = "error", alt = { "FIXME", "BUG", "FIXIT", "ISSUE" } },
|
FIX = { icon = " ", color = "error", alt = { "FIXME", "BUG", "FIXIT", "ISSUE" } },
|
||||||
|
|
@ -14,6 +20,24 @@ require("todo-comments").setup {
|
||||||
info = { "#696c77" },
|
info = { "#696c77" },
|
||||||
hint = { "#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
|
-- Todo-Comments
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue