Would anyone be able to help me add Roc syntax highlighting in popular syntax highlighting libraries?
I'd like to start with highlightjs and codemirror because these two libraries are used on exercism.org, respectively for all static code (e.g., code snippets) and for the online editor.
We currently use Elm syntax highlighting in the Roc track on Exercism.org, but switching to proper Roc syntax highlighting would be much better. We're tracking this in issue #74.
Thanks for your help!
I got started and (mostly) finished adding a lexer for Roc in Pygments but got super busy and haven’t touched it since
Looks pretty different to implement but at the very least someone can copy the list of keywords and operators and save themselves a little time
https://github.com/ethannixon66/pygments/blob/087bdc63ba07838dd3bed80ecdf38c5e457b9dc6/pygments/lexers/roc.py
I’m taking a look at highlight js now
Last updated: Jul 26 2025 at 12:14 UTC