Is it possible to add support for automatically highlighting TODO, ToDo in comment regions? Right now it must be defined in each filetype separately (or am I missing something)?
It's technically possible to edit all the language support scripts that define a "comment" region, and highlight some keywords within them.
But some scripts highlight comments as a simple regex, so it would be extra work to make those target comment lines specifically.
And not everyone would want arbitrary words to be highlighted anyway (and how should they be highlighted by default?).
It's easier to just use the following in your user configuration (taken from my own):
# highlight keywords
add-highlighter global/ regex \b(TODO|FIXME|XXX|NOTE)\b 0:+rb
Most helpful comment
It's technically possible to edit all the language support scripts that define a "comment" region, and highlight some keywords within them.
But some scripts highlight comments as a simple
regex, so it would be extra work to make those target comment lines specifically.And not everyone would want arbitrary words to be highlighted anyway (and how should they be highlighted by default?).
It's easier to just use the following in your user configuration (taken from my own):