.htm Twig plugin functionality
Hi everyone,
I realise this is probably a pretty novice question, however I've looked through the PHPstorm settings for a good time now and can't find a solution to my problem.
I use a CMS that uses Twig templating in .htm files. However PHPStorm by default only gives html, css corrections, auto-completion etc.
Is there a quick way to make the IDE recognise that it should add their Twig functionality to .htm files?
Thanks in advance!
Please sign in to leave a comment.
Hi there,
In order to provide Twig support such file must be associated with Twig File Type (Settings/Preferences | Editor | File Types).
By default it work with *.twig files only .. so you have to associate your *.html pattern with Twig file type. Downside -- such association is IDE-wide setting so will affect ALL projects.
If *.html pattern cannot be associated for whatever reason -- then try to come up with some another pattern (e.g .double extension perhaps.. *.twig.html; or some unique extension (e.g. *.thtml) or whatever).
Thanks a lot for the reply.
I'm probably sticking with associating all *.html files with Twig for the time being, until association conflicts come in the future that is.