I want to know if there is a way in intellij to know the type of a val with a shortcut or a button?
For instance:
val t = 3
If i select t and do a certain shortcut, can I know that t is ant integer? Thanks
I want to know if there is a way in intellij to know the type of a val with a shortcut or a button?
For instance:
val t = 3
If i select t and do a certain shortcut, can I know that t is ant integer? Thanks
According to How do I view the type of a scala expression in IntelliJ, Alt + =
on expression should work.
Another option would be Ctrl + Q
- quick documentation lookup. It could be used nearly anywhere in editor, and is capable to show documentation for type, type of variable, etc.
You can select your val or var and press Ctrl + Alt + e This will add to your code the type of your val. On your exemple, you will get:
val t: Int = 3