[ANN] Prismjs now supports ReScript

Prismjs now supports ReScript :smile:
I’ve been working to add support for ReScript in Prism, and
this weekend, the PR was merged and released in v1.28.0.
The missing support for ReScript in Prism is one of the most painful points when creating documentation for ReScript libraries. Probably will take a time to work properly in projects that uses react-prism-renderer like Docusaurus, Nextra, etc because we have to wait for a new release of prism-react-renderer that uses prismjs@v1.28.0. If you are using Docusaurus you can add support by following this tutorial in the official docs (check out our workaround for reform here)
Some projects like rescript-relay (@zth) , styled-ppx (@davesnx), reform, and graphql-ppx (@jfrolich) can benefit from this feature since rescript wasn’t officially supported by prism and we were forced to use the limited support for ocaml and reason syntax.
Here is a preview from the ReForm docs with the new ReScript highlighting:

You can see more in the Prismjs examples page.

26 Likes

Thanks @vmarcosp for working on this. I will try to push to have it in prod as soon as I have some free time :smiley:

2 Likes

Echoing @davesnx , thank you very much for working on this! This has been a missing piece in the ecosystem that I’ve personally long wanted, and that’ll help lift the quality of ReScript library docs etc. Great work!

1 Like

It took me a while to update, but here we go: https://styled-ppx-git-update-website-tech-davesnx.vercel.app/

Thanks for the effort, I owe you a beer!

2 Likes