I failed to find any information on how to change file type dynamically for PhpStorm. For example I need to deal with HTML files, which could have some PHP, Twig markup, embedded JS at the same time.
It is of course possible to choose the type via Preferences -> File Types, but the pattern can be registered for one file type only, and this is a problem.
It is not possible to enable multiple types for a single file, and it is not convenient at all to switch types via settings all the time.
You cannot use "Open as" or change language on the fly.
Please follow these and related tickets (star/vote/comment) to get notified on any progress: