Add-highlighter regex: getting the middle bit `${args.drop(1).joinToString(" ")}`

Hey @yerlaser and wider community, I’m having trouble getting the middle bit ${args.drop(1).joinToString(" ")} highlighted for kotlin.kak.
using add-highlighter regex
yet on the next line it picks it up
and you can see by doing
you can get it at each correct point

Source code is from here:

Any ideas guys on how to implement this correctly? Bye :thinking:

before each/every copy and paste do : auto-pairs-disable
then to insert from normal mode do \i
now paste from clipboard which is not interpreted by Alex’s auto-pairs or kakoune.

Perfect Prefect Prion.
grade: A+
kotlin.kak-Screenshot 2021-07-07 212351
grade: A+
kotlin.kak-Screenshot 2021-07-07 212305
grade A+:
kotlin.kak-Screenshot 2021-07-07 212438

The triple P threat. Thanks buddy. Bye :wave:

Looks like it’s interpreting
"$date @ time\n\t${args.drop(1).joinToString("
as two different strings. I suspect -recurse doesn’t work with quotes since they aren’t balanced like {}.

vim can highlight this properly, but I find vimscript ftp files unreadable so who knows how they do it. Their solution (at least for ruby) somehow applies the default file highlighter inside the interpolation but I can’t think of a way to do that without dege cases. You could try just making \$\{[^\n]*\} a region that applies the kotlin highlighting over-top the string one and allow the highlighting to break in some very rare circumstances.