Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript variable color in JetBrains WebStorm

Why JS variables have different colors in JetBrains WebStorm 2016 ? There are no significant differences between express, path, favicon... variables: I use them all in the code.

Do these colors mean something, is it normal behavior of WebStorm? If not - how to change them?

Variable colors in JetBrains WebStorm

like image 567
Serob_b Avatar asked Jan 11 '17 00:01

Serob_b


2 Answers

The colours for those member fields are different because they are different types.

The fields coloured purple are object variables and the fields in light orange are function variables.

IntelliJ (or WebStorm) has determined this by examining the export field of the targeted JavaScript files.

See screenshots below:

Screenshot showing syntax highlight colour of JavaScript instance functions

Screenshot showing syntax highlight colour of JavaScript instance variables

like image 90
Taylor Hx Avatar answered Oct 25 '22 00:10

Taylor Hx


Open Settings/Preferences dialog, and under the File node, click Colors & Fonts and select JavaScript. From right panel you can change all the colors

It's important to note that the check box Use inherited attributes is selected!

For more detail go to this link

Change Colors

like image 37
Ivan Barayev Avatar answered Oct 25 '22 01:10

Ivan Barayev