You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Java primitive types treated as identifiers, not keywords #2986
When editing Java in Visual Studio Code, primitive types such as boolean, int, long, etc. are shown in black as identifiers. They should be shown in blue as keywords.
I think the current behavior is correct. boolean, int, long, get the color for type references. I recommend you to switch to the Dark+/Light+ themes where boolean, int, long, will be turquoise.
The Dark/lIght Visual Studio themes have no special color for types, therefore it is the default foreground color.
Now that I look at how this is handled for other programming languages, I see that it is not a Java-specific issue but rather a discrepancy between how syntax highlighting is done in Visual Studio Code vs. regular Visual Studio. If you open a C++ or C# file in Visual Studio, primitive data types are colored in dark blue as keywords, not in light blue like other types such as classes, enumerations, etc. The behavior from Visual Studio Code is inconsistent.
When editing Java in Visual Studio Code, primitive types such as
boolean,int,long, etc. are shown in black as identifiers. They should be shown in blue as keywords.