Weird interactions between Scala interpolated strings and language injections (feature request)

Scala 2.10 introduced interpolated strings, which the Scala plugin (0.22.302) supports nicely.

But if you try to mix them with language injections, like SQL, it mostly works, but the highlighting won't take into account '$' characters escaped by writing them twice.

A more practical example:

/* language=SQL */
SELECT post$$id, liked
FROM post_like
WHERE user$$id = ? AND post$$id = ?

The SQL injection parser now complains that 'post$$id' and 'user$$id' are unknown columns, but they were actually meant to be 'post$id' and 'user$id' instead.

It would be nice if the Scala plugin properly 'translated' the string before 'sending it off' to the language injection.

1 comment

Hi Daniel! I've created an issue (SCL-6258) in our issue tracker. Thank you for the report!


Please sign in to leave a comment.