I don’t suppose there’s a way to annotate a string parameter as wanting a default language injection?
I know I can comment a string before the literal, but I think it would be useful to be able to declare a string parameter as having a default language.
Example:
fun html(
@Language("html")
str: String
) {
...
}
fun main() {
html("""<p>Hello</p>""") // No need for //language=html
}
Looking at https://www.jetbrains.com/help/idea/using-language-injections.html it seems like there might be a way with Kotlin JVM, but not Kotlin JS, is that true?