如何从 IntelliJ IDEA 中推断类型的变量导航到 Kotlin 类型声明?

Sas*_*ota 4 jetbrains-ide intellij-idea kotlin

假设我有这样的代码:

val request = buildRequest()
Run Code Online (Sandbox Code Playgroud)

问题:我想查看类型request是什么并导航到它的声明。

我可以通过将变量悬停或使用来找出类型Ctrl+Shift+P,但我还没有找到一种简单的方法来导航到类型本身。command + click在这里不起作用。

问题:如何导航到类型被推断的变量的类型声明?

小智 7

你有没有尝试使用Ctrl+ Shift+B键盘快捷键?

此提示适用于 Windows 或 Linux 用户。

上下文菜单

类型声明的结果选择