Trying to enable XML language in Twig templates in PhpStorm

In my project I have

files that render XML using the Twig templating engine.
Anyone figured out how to enable both XML and Twig code support at the same time in PhpStorm?

I tried
Settings -> File Types
, but only one type can be applied to a file type at a time.
The funny thing is, if I change settings, there is a few seconds when PhpStorm is reindexing the project and both XML and Twig rules are applied to a file, but when it finishes reindexing, it removes one of the languages.

I also thought about language injections, but that feature seems to only work with strings.

Any ideas appreciated.

Please sign in to leave a comment.