todo-comments.nvim icon indicating copy to clipboard operation
todo-comments.nvim copied to clipboard

Allow multiple subcategories of keyword to embed in the patterns

Open ELLIOTTCABLE opened this issue 4 years ago • 0 comments

Title pretty much says it. In particular, I'd like to require a colon on some keywords, but not all. Comments like this show up fairly often in our codebases:

// DOCME
function(){

}

I'd love for these to show up in Trouble alongside more* specific TODO: ...-style comments.

Given the fact that the : is matched in the pattern, not elsewhere in the config, I suppose the best way to do this would be allowing me to have a pattern like this:

{
  keywords = {
      DOC = {
         icon = " ",
         color = "info",
         alt = { "DOCME" },
         category = "BARES",
      },
  },
  merge_keywords = true,
  highlight = {
    pattern = [[.*<(KEYWORDS):|.*<(BARES)>]],
  },
  search = {
    pattern = [[\b(KEYWORDS):|\b(BARES)\b]],
  },
}

ELLIOTTCABLE avatar Aug 31 '21 03:08 ELLIOTTCABLE