Search code examples
javascriptidephpstorm

PhpStorm 2016.3 - JS syntax highlight colors not same in .php and .js files


So, the question is as the title reads. I would greatly appreciate any help in understanding why could PhpStorm use different syntax highlighting colors in a .js file and .php file for JavaScript.

Contrary to the popular question of why js syntax highlighting doesn't work in .php files :)

I imported settings from PhpStorm 10 to 2016.3, but as I recall, version 10 had the same problem for me.

Here is how it looks:

enter image description here

As you can see, variable identifiers, function declaration, function calls, and other stuff is not highlighted correctly in the .js file, but looks just fine under <script> tags in .php files.

Here is a screenshot of Editor - Colors & Fonts - JavaScript:

enter image description here

According to this, everything is fine. But not in my .js files, where the bulk of work is :(


Solution

  • So it turns out, as Juan Tonina suggested in the comment to my question, code inspection/highlighting was off for .js files for some reason. Big thanks!