On our project we use Groovy scripts that are embedded directly in XML CDATA blocks, this feature would be very helpful for this, since now there's no way to get syntax highlighting working in this use case.
Addition to this feature would be to somewhere specify what variables and types are available in these one-off scripts, since in my use case there are variables and methods injected at runtime which you can freely use.