As I understand it, if we were to add Chapel support to CodeMirror, we'd get syntax highlighting for code in Jupyter notebooks which seems very attractive, especially for projects like chpl_magic
Related to #5908 and #7414
Hey @ben-albrecht I would like to start working in this issue.
I think its really necessary if we have this feature as users will find it more interesting and makes it more easy to understand the code.
Thanks @krishnadey30!
I'm not sure what existing format is most similar to CodeMirror's but #5908 has a list of currently supported syntax highlighting formats with links. I'd try to start from one of those.
@ben-albrecht Thanks. I will try to take reference from these.
@ben-albrecht Please have a look at this. https://github.com/krishnadey30/CodeMirror
Based on review-by-visual-inspection of the images you posted on Gitter, the highlighting looks good to me. I'd suggest opening a PR against the CodeMIrror master branch. Thanks for taking this on!



Hey @ben-albrecht thanks for your time. I have opened a PR.
https://github.com/codemirror/CodeMirror/pull/5801
@ben-albrecht My Pull request was closed by codemirror as they don't accept new modes into the distribution anymore. They have asked me to publish to npm. I will publish it soon.
@ben-albrecht @bradcray
Please find the link to the npm module for codemirror-mode-chapel
https://www.npmjs.com/package/codemirror-mode-chapel
Thanks @krishnadey30 !
I'm going to close this, but we still need to figure out how we can use this package from the magic function definitions over in https://github.com/reuster986/chpl-magic to close https://github.com/reuster986/chpl-magic/issues/1
@ben-albrecht I will once look at this and try to find a solution for this.