如何激活Kotlin中的类型注释提示(如所示)? [英] How do I activate type annotations hints in Kotlin like depicted?

查看:527
本文介绍了如何激活Kotlin中的类型注释提示(如所示)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够在MacOS intellij版本中激活一次此选项,但是再也找不到此选项了,我忘记了它的名字.

I was able to activate this option once in my MacOS intellij version, but could never find this option anymore, I forgot its name.

我知道可以使用CTRL + SHIFT + P替代方法,但这不是用户友好的方法.

I know there is the CTRL+SHIFT+P alternative to this, but it is not as user-friendly.

如何激活选项以使intellij向我显示所有所示的推断类型?该屏幕截图来自intellij,我可以将其显示为这样的类型提示",因此这是可能的.我只是不记得在哪里可以找到这个选项了,所以我可以在所有其他intellij的菜单中激活它.

How can I activate the option to make intellij show me all the inferred types like depicted? This screenshot came out of the intellij where I was able to put it showing "type hints" like this, so it is possible. I just don't remember where to find this option anymore so I can activate in all my other intellij's.

推荐答案

转到设置->编辑器->常规->外观->显示参数名称提示"->配置...->语言:Kotlin->选项->显示局部变量类型提示".

Go to Settings -> Editor -> General -> Appearance -> "Show parameter name hints" -> Configure... -> Language: Kotlin -> Options -> "Show local variable type hints".

在较新版本的IntelliJ(至少从2019.3.1起)中,它位于: 设置->编辑器->镶嵌提示-> Kotlin->显示参数提示"(感谢@zero).

In newer Versions of IntelliJ (at least from 2019.3.1 onwards) it is located at: Settings -> Editor -> Inlay Hints -> Kotlin -> "Show parameter hints" (thanks to @zero).

我想您可以说,此功能配置有点隐藏在菜单中.

I think you are allowed to say, that this feature configuration is a little bit hidden in the menues.

这篇关于如何激活Kotlin中的类型注释提示(如所示)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆