隐藏新的IntelliJ 2020.2中的“var”类型预览

huangapple go评论55阅读模式
英文:

Hide "var" type preview in new IntelliJ 2020.2

问题

我刚刚更新到IntelliJ 2020.2,虽然有些方面很好,但也有一些不好的地方。

当使用Java的var功能时,IntelliJ现在会在变量名称旁边显示它的类型,对我来说完全没有用处,而使用var的唯一原因是因为类型已经很明显了。

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

在IntelliJ 2020.2中显示为

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

(括号中的类型是一个气球,你无法右键单击或突出显示)

我如何禁用这个无用的功能?

英文:

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?

答案1

得分: 15

禁用设置(macOS上的首选项)|编辑器|嵌入提示|Java|隐式类型:显示提示:

英文:

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

隐藏新的IntelliJ 2020.2中的“var”类型预览

答案2

得分: 1

我找到了。CTRL+ALT+S,然后搜索Inlay Hints,选择Inlay Hints -> Java -> Implict types并将其关闭。

但愿它在默认情况下是禁用的,因为现在我将不得不在所有地方关闭它。

英文:

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.

huangapple
  • 本文由 发表于 2020年7月30日 03:13:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/63160871.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定