I have to use this IDE at work. I also have to work on Contao templates which use the html5 extension.
I just got PhpStorm to recognize those files as HTML, big win, but it would be great if it would know what's up inside too.
Assign *.html5 pattern to PHP Files in Settings/Preferences | Editor | File Types
.htm files. I've added *.htm pattern for php file type, and PhpStorm warned me, that the existing assignment will be removed. If proceed, PhpStorm can start adding .php extension "on top of " the existing filenames; In my case it helped using *.ht* pattern instead, it matches anything with extension starting from ht.
*.html5pattern to PHP Files in Settings | File Types