How to add custom IntelliJ Language Injection to scala string-interpolation?

using Scala in IntelliJ, you can already do

var c = s"some ${compound * expression}"

and have proper syntax highlighting for the

${compound * expression}
. Scala allows you to define custom string interpolaters, to do other things
var c = sql"select 1 from dual"

Does anyone know how to fiddle with the custom-language-injection functionality to nicely highlight these custom string interpolators? I've messed around with the stuff under the File->Settings->Language Injections but it seems really confusing, and I can't find any existing injections that do the magic string interpolation syntax. Presumably that one is hard coded (since it also has the nice code navigation features) but i'm hopeful there'll be some way of getting it to recognize the nice

syntax and highlighting it nicely for me.

Please sign in to leave a comment.