-1

when I write scala code in idea, sometimes it will show the datatype like this: enter image description here

but sometimes it will not show like, for example: enter image description here

I want to know how it happened, can I force to make it happen?

Gaël J
  • 11,274
  • 4
  • 17
  • 32
blisslee
  • 9
  • 2
  • Not sure of the rule to display it (there's probably a setting) but by default I noticed it displays types when you are chaining more than 2 calls and each call is on its own line. – Gaël J Apr 24 '22 at 10:21
  • Btw you can select some expression and use Alt + = to know the type. – Gaël J Apr 24 '22 at 10:22
  • 1
    This is a duplicate of https://stackoverflow.com/questions/7858588/how-do-i-view-the-type-of-a-scala-expression-in-intellij – Erik van Oosten Apr 24 '22 at 18:25
  • Does this answer your question? [How do I view the type of a scala expression in IntelliJ](https://stackoverflow.com/questions/7858588/how-do-i-view-the-type-of-a-scala-expression-in-intellij). For the future It is first link on right panel – Mikhail Ionkin Apr 24 '22 at 19:00

1 Answers1

0

For recent/current Intellij that should be: Alt + = (click on what you want highlighted first)

Per: https://stackoverflow.com/a/7858871/5065400