Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide "var" type preview in new IntelliJ 2020.2

I just updated to IntelliJ 2020.2 and while some things are good some thing are bad..

When using the Java var feature IntelliJ now shows the type of it right next to the variable name which is completely useless to me and the only reason one uses var at all, because the type is already obvious.

var a = "hello world".split(" ");

Displays in IntelliJ 2020.2 as

var a (: String[]) = "hello world".split(" ");

(the type in parentheses being a balloon which you can't right-click or highlight)

How can I disable this useless feature?

like image 772
Nand Avatar asked Jul 29 '20 19:07

Nand


2 Answers

Disable Settings (Preferences on macOS) | Editor | Inlay Hints | Java | Implicit types: Show hints:

Implicit types hints

like image 193
CrazyCoder Avatar answered Oct 10 '22 03:10

CrazyCoder


I found it. CTRL+ALT+S then search for Inlay Hints and select Inlay Hints -> Java -> Implict types and turn it off.

Wish it was pre-disabled because now I will have to turn it off everywhere.

like image 30
Nand Avatar answered Oct 10 '22 01:10

Nand