Using CakePHP to write code, usually *.ctp files contains PHP, HTML and JavaScript code. Unfortunately PhpStorm recognize PHP and HTML only:
Of course if I edit a JavaScript-only file (.js) the highlight and autocompletion work.
I tried to follow this answer, but I cannot assign the same extension to multiple languages.
How to edit all the three languages in PhpStorm?

<script>tag (where you store your JS code in this file). If you use<script>tag instead it will work just fine. I do not think that anything can be done here, unless it's supported by Cake-specific plugin (that knows what$this->Html->scriptStart(...does and may inject JS language into that place).CakePHPinstead of writing stuff directly. Now I have to do the opposite... I'm learning PHP/CakePHP and it's confusing!