Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to navigate to a Kotlin type declaration from a variable with an inferred type in IntelliJ IDEA?

Let's say I have a code like this:

val request = buildRequest()

Problem: I want to see what the type of request is and navigate to its declaration.

I can find out the type by hovering the variable or using Ctrl+Shift+P, but I haven't found an easy way to navigate to the type itself. command + click doesn't work here.

Question: How to navigate to the type declaration of a variable whose type is inferred?

like image 250
Sasha Shpota Avatar asked May 25 '20 11:05

Sasha Shpota


1 Answers

Have you tried using Ctrl + Shift + B keyboard shortcut?

This tip for Windows or Linux users.

Context menu

Result of Type declaration choose

like image 140
Ildar Serazitdinov Avatar answered Oct 11 '22 19:10

Ildar Serazitdinov