10

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?

Nand
  • 568
  • 3
  • 18
  • I think it's called "Type hints" in the settings. – marstran Jul 29 '20 at 19:14
  • @marstran Thank you, that wasn't exactly it but it helped me find the correct setting. I'm not used to messing with IntelliJ's settings. – Nand Jul 29 '20 at 19:19

2 Answers2

15

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

Implicit types hints

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
1

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.

Nand
  • 568
  • 3
  • 18