I want to know if there is a way in intellij to know the type of a val with a shortcut or a button?
val t = 3
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.