atom / language-todo

TODO highlighting package for Atom
Other
81 stars 66 forks source link

Q: How to change language-todo matching regex in config.cson #79

Open dsanalytics opened 6 years ago

dsanalytics commented 6 years ago

Does language-todo support modifying its regex in config.cson to match new words? If it does, can you show how that entry would look like if I'd like to include all existing keywords + e.g. MYWORD keyword? Thanks.

P.S. This is related to: https://github.com/mrodalgaard/atom-todo-show/issues/199#issuecomment-392369360

For example, below are todo-show config.cson entries:

  "todo-show":
    findTheseTodos: [
      "TODO"
      "FIXME"
      "CHANGED"
      "XXX"
      "IDEA"
      "HACK"
      "NOTE"
      "REVIEW"
      "NB"
      "BUG"
      "QUESTION"
      "COMBAK"
      "TEMP"
      "COMEBACK"
    ]
    findUsingRegex: "/# \\b(${TODOS})[:;.,]?\\d*($|\\s.*$|[\\{\\[\\(].+$)/g"

OS: Win 10 64bit Home Prem Atom: 1.23.2 x64

ThomasLandauer commented 5 years ago

I was looking for the same thing. It looks like they're all hard-coded, see https://github.com/atom/language-todo/blob/master/grammars/todo.cson and (even worse) https://github.com/atom/language-todo/blob/master/snippets/todo.cson

Entreprenerdz commented 2 years ago

Dang. I came here looking for the same thing, hoping they weren't hard coded.

btw @ThomasLandauer the (even worse) link is just the snippet code for assisting in ensuring the keyword is typed properly for the given language you're working in. If you're able to type all of letters in capitals on your own, this file doesn't even matter. 😸