question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add syntax highlighting for `var` keyword in Java 10

See original GitHub issue

Original posted on: https://github.com/Microsoft/vscode/issues/55483

I’m using VSCode 1.25.1 and looks like the highlighting system can’t recognize the var keyword introduced in Java 10.

Environment
  • Operating System: Manjaro Linux
  • JDK version: 10.0.1
  • Visual Studio Code version: 1.25.1
  • Java extension version: 6.690.916
Steps To Reproduce
  1. Write a simple Java class and use var to define a variable in a method
  2. Save it with VSCode
Current Result

The var keyword is not highlighted.

Expected Result

The var keyword is highlighted.

Additional Informations

I already opened an issue on the VSCode repo but they redirected me here.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
snjezacommented, Aug 6, 2018
0reactions
fbriconcommented, Nov 14, 2018

ok, fair enough

Read more comments on GitHub >

github_iconTop Results From Across the Web

532313 – [10] Syntax coloring for 'var' keyword - Bugs - Eclipse
So for semantic highlighting of 'var', we can add a new option in "Java" syntax coloring as: Type 'var' and set the defaults...
Read more >
Simplify Local Variable Type Definition Using the Java 10 var ...
In Java 10, the var keyword allows local variable type inference, which means the type for the local variable will be inferred by...
Read more >
Var keyword in Java - Stack Overflow
To me var makes the code harder to read as it hides the type of a variable. When I am reading code I...
Read more >
Code Syntax Style: Implicit/Explicit Typing ('var' Keyword)
Modify settings in the 'var' usage in declarations category according to your coding practices/standards. You can set different preferences of ...
Read more >
var keyword in Java - GeeksforGeeks
The var keyword was introduced in Java 10. Type inference is used in var keyword in which it detects automatically the datatype of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found