The code highlighting is so rad, but I think there’s a bunch of work necessary to do it really right. In my very first sample I had a code snippet that was just the body of a function, and highlighting that really didn’t work.
💯 1
b
bnorm
05/06/2025, 2:39 PM
The highlighter uses a generated ANTLR lexer implementation based on the official kotlin spec. It's really slow; especially on web. I think it would be faster to use just the parser, but we'd need to basically reimplement the lexer, but it's a significant amount of work I just haven't found the time for yet. Hopefully someone else does it first?
bnorm
05/06/2025, 2:40 PM
As for the incorrect highlighting of the function body, you can change the