Home > Back-end >  Java Syntax Highlighting Issue for IntelliJ Ultimate
Java Syntax Highlighting Issue for IntelliJ Ultimate

Time:04-11

When I run the files in IntelliJ Idea Ultimate, I can getting improper syntax highlighting of only orange, green, and gray. Is there any way to get more colors for syntax highlighing for methods and variables like VSCode does? Thank you for your help!

This is my theme with One Dark Theme below

enter image description here

I want the theme to be like:

enter image description here

CodePudding user response:

Theme

I would suggest using Default coloring

Syntax coloring after modification:

coloring after modification

Notes:

  • The ugly changes I made were just for demonstrating the approach, but the required changes shown in the question's screen shot should be straightforward to achieve.

  • Selecting italicization for string literals had an unintended side effect. The display of the character 'ᚙ' was changed because there was no italic equivalent to render.

  • If you mess things up completely, you can easily revert to the defaults. Click the settings cog wheel next to your Scheme name and select Restore Defaults from the popup menu:

    Restore menu entry

  • A disappointing limitation with this approach is that all Java keywords must be the same color. That's why import and package and public and throws and char and new all have the same color in the Java source screen shot above.

  • You can export your customization if you want to preserve or share it. Select Export from the context menu shown when you click the settings cog wheel. There is also an Import Scheme option.

  • See Colors and Fonts in the Intellij IDEA documentation for more information.

  • Related