Code Sugesstion and Coloring Not Working 2017.2
I've Updated the IDE to the latest available version and after that code suggestion feature is unavailable at some points.
Here is the issue and my workaround that i used to solve it.
I'm working on '*.volt' file which comes with Phalcon PHP framework.
At first java script/JQuery code suggestion went missing on '*.volt' file and after that, i registered *.volt extension as a Twig File under File Types settings in the IDE.
Now Previous Problem Solved, But after that PHP syntax Highlighting and PHP code suggestion went missing.. Please see the below picture.

Please explain me how to rectify this issue..
Thank You
Please sign in to leave a comment.
Hi there,
Can you please tell how was it working before (what file type it was associated before etc)?
Thing is: to have PHP code recognized (content between <?php ... ?> tags) the file must be associated with "PHP File" file type (the one possible exclusion that I know is Blade files in Laravel .. where file name is *.blade.php but uses separate "Blade" file type).
You have associated your files with "Twig" file type ... which does not have PHP support. So it's expected to have such behaviour.
>At first java script/JQuery code suggestion went missing on '*.volt' file and after that, i registered *.volt extension as a Twig File under File Types settings in the IDE.
From what I understand the missing completion for JavaScript in .php files has been resolved and fix will be available in 2017.2.1 (I'm referring to https://youtrack.jetbrains.com/issue/WI-36767 ticket)
>Can you please tell how was it working before (what file type it was associated before etc)?
It was registered under .PHP file type. See the below picture.
So until they release next update i have to associate my .volt files as Twig and PHP.
Twig for JavaScript cording and PHP is for PHP coding.. (Such a headache)
But Why can't they add PHP support for Twig Files..?
>So until they release next update i have to associate my .volt files as Twig and PHP.
AFAIK you cannot associate 2 template languages at once... (file can only be associated with one File Type at a time)
>Twig for JavaScript cording and PHP is for PHP coding.. (Such a headache)
If you desperately need that -- better rollback to 2017.1.4 for now until 2017.2.1 will become available (1-2 weeks or so I think). It's still fully functional version.
>But Why can't they add PHP support for Twig Files..?
Because Twig itself does not support PHP code (at all) as it contradicts the actual reason why Twig was created (it simply has no tags for PHP code parts .. as compared to Smarty / Blade (even though it supported in Smarty 3 it is marked as deprecated and strongly discouraged to use))