Search code examples
htmltwigphpstorm

PhpStorm: Use twig support in html files


How can I use twig support in HTML files? Or generally, how can I add support for different languages to an existing file type?


Solution

  • You can change the used editor (html, twig,...) based on a given file name pattern per project. Just got to File->Settings -> Editor->File Types and add *.html as a pattern to the Twig editor. The only downside is, that you can't assign a pattern to two editors ans switch around. enter image description here