Keyword colors in source editor

Some themes such as Tomorrow Night Bright will change the color of the word "TODO" when it appears in a comment (e.g., # TODO). I'd like to have this happen with other words such as "NOTE", "WARNING", etc. to catch my attention when reviewing my code. I'm guessing this must be controlled by a list of keywords but I can't seem to find such a list or any other way of achieving this via a custom theme.

There is a dictionary file of keywords in the R directory (on my machine: C:\R\Current Version\share\dictionaries\en_stats.txt" which contains the word "TODO", but none of the other words in that file appear in a different color when included in a comment.

Does anyone know if there's a way to achieve this?

So I've found the dictionary - it's locked away in (on my machine):

http://127.0.0.1:8331/rstudio/EE695D2332E442F1DEDE0B9A5AE0F7BF.cache.js:formatted

All the hi-lighted syntax keywords are in there, including "TODO" and "FIXME". Since I don't know anything about working with Java script or web pages, I guess there ain't noth'n I can do :frowning:

1 Like

This is where we do that highlighting: https://github.com/rstudio/rstudio/blob/c727a0c108376f7108dc835d7a4f22ccaf99f0f6/src/gwt/acesupport/acemode/r_highlight_rules.js#L217-L221

If you're inclined, we would welcome a pull request adding some of these new terms! The RStudio repository is available at https://github.com/rstudio/rstudio.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.