What does glitch use for syntax highlighting?

I was wondering what glitch uses for syntax highlighting. I want to use it in my own project because it’s more “thurough” than some of the other highlighters.

Hi MeowCatPersonThing!

Thanks! We work hard to integrate the different addons and make it thorough.

Most of the Glitch editor uses CodeMirror by Marijn Haverbeke. The syntax highlighting for different syntaxes (such as javascript or markdown) are different addons (“modes”) for CodeMirror, and some Glitch’s modes, such as the dotenv syntax highlighting, are custom. But if you were thinking of Javascript syntax highlighting in particular, https://codemirror.net/mode/javascript/index.html is a good approximation of how Javascript syntax highlighting works in the Glitch editor.

Hope this helps,

Johnicholas

2 Likes