Ben Chuanlong Du's Blog

It is never too late to learn.

Show Inferred Type in IntelliJ IDEA

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

You can use the shortcut ctrl + shift + p to show inferred type of a variable when the cursor is on the variable in IntelliJ IDEA. You can also configure IntelliJ to show Scala data types when you hover over a variable.

  1. File > Other Settings > Default Settings ...

  2. Go to "Languages & Frameworks" > Scala

  3. Go to the Editor tab

  4. Enable "Show type info on mouse hover after X ms"

  5. Apply/save changes.

References

https://alvinalexander.com/source-code/scala/how-configure-intellij-idea-show-scala-data-types-when-you-hover-over-field

Comments