Closed isaacvando closed 1 month ago
💯 agree. I've already started looking into this, but it was trickier than I expected. I'm trying to get a bit of help from the Roc community because it's not something I'm very familiar with. I was hoping to just adapt Elm's CodeMirror syntax highlighter, but it was designed for CodeMirror 5, and Exercism.org uses CodeMirror 6 if I'm not mistaken. Perhaps that not a problem though, since Elm's syntax highlighter seems to work fine in CodeMirror 6. If you have some advice on this, I'd appreciate it.
Unfortunately I don't have any advice, just thought it would be worth creating an issue to track it!
@Anton-4 might be able to help or point you to someone who can
I would open a topic on zulip in the contributing channel, several people have set up Roc syntax highlighting for all kinds of editors
I posted a message on Roc's Zulip chat .
I've published a package for this on npm: highlightjs-roc. There may be some more adjustments that need to be made, but we should be able to integrate this with Exercism following the pattern of this PR.
Thanks @isaacvando , this is really cool! I've just submitted a PR inspired by the PR you suggested. 👍
Sweet! Were you able to run the website locally to test it? I’m wondering if some things will look weird without having the roc specific css file included.
I’m also not very familiar with JS packages, so I’m not sure if I need to do something differently with webpack to export a function called setupRoc like is used in the PR.
I created a new issue to track Codemirror syntax highlighting specifically, and will close this one now that the highlight js highlighting has been integrated 🎉
Right now the track uses Elm syntax highlighting. It would be great to have Roc specific highlighting at some point.