Post

Today I shipped a huge change to syntax highlighting in Discord: code blocks and file previews on web are now being highlighted by Tree-sitter, instead of highlight.js.

SUPER COOL!!!! Rebane's tool made this update fun. 😄 I hope one of these days a syntax highlighter will support Ren'Py out of the box, but it is a particularly challenging language to parse, since it is, like, three languages in one (ATL, Screen Language, regular Ren'Py, Python expressions(!!)...)

Well the good news is 1) someone has already built a tree-sitter grammar for any language you can think of, and 2) our highlighter is open source. While we are unlikely to invest in maintaining languages like this, you're welcome to.

0 reposts1 like