I’ve just noticed that Kotlin Playground and, as a...
# kotlin-website
p
I’ve just noticed that Kotlin Playground and, as a result, also Kotlin snippets in the docs and on kotlinlang.org, don’t highlight syntax for expressions inside the strings. It looks a bit weird, as if it was a regular string, especially when you’re used to IntelliJ being aware of the expressions. I see that the editor component used there is https://codemirror.net/, and apparently for JS it has the expressions syntax highlighting implemented
v
Yeah, also always stumbled upon that. The project to report that to on Kotlin side is https://github.com/JetBrains/kotlin-playground. But the main issue is probably to be reported to the Codemirror project I guess, or where the Kotlin mode is maintained.
👍 1
n
Hi there, Sad, but that is not supported by Playground yet. We have a task in our backlog to implement, but it requires an update Codemirror beforehand since the used version is outdated. We plan this work in the mid-term (within three months). I created a task in KT project - KT-61021
👌 1
v
Where is the Kotlin mode coming from? I don't see it in the Codemirror repo
v
As if Kotlin is too much c-like 😄
p
it has braces… like the majority of languages 😄
fair enough, Java’s syntax is inspired by C++, C++ came from C, Kotlin is “Java++“. Here you go
v
Indeed playground seems to set
data-target-platform
to
java
which then ends up also in the c-like mode