IntelliJ IDEA scala type info

后端 未结 5 759
遥遥无期
遥遥无期 2021-01-02 02:28

The Eclipse scala plugin has a very nice info. One can hover over pretty much anything be it a function definition, val, var, function call etc and get type info. This is im

相关标签:
5条回答
  • 2021-01-02 02:56

    Type Info is great in IntelliJ; you have to press the key shortcut to see the type of a given variable or function.

    If I recall correctly, there's a conflict between Type Info's key shortcut and something else in IntelliJ. If you go to Settings -> Keymap -> Plug-ins -> Scala -> Type Info, double-click it, you'll see the conflicts. I changed mine to Option =. (see this answer for more tips if it still doesn't work)

    Another shortcut I use quite a lot to quickly look up a definition is shift I.

    0 讨论(0)
  • 2021-01-02 03:15

    Intellij IDEA 14 (OSX) has this option in the Preferences -> Languages and Frameworks -> Scala Compile Server menu option.

    Ensure that the Show type info on mouse motion with delay option is ticked.

    enter image description here

    0 讨论(0)
  • 2021-01-02 03:16

    Not exactly what you're looking for but close enough - you can press alt + '=' when the cursor inside the function name, val name etc., and you will get popup with the type.

    0 讨论(0)
  • 2021-01-02 03:22

    To enable on mouse hover type information go to Settings->Scala and select the "Show type info on mouse motion with delay" checkbox.

    enter image description here

    0 讨论(0)
  • 2021-01-02 03:22

    I'm using Idea 13.0.2 with scala plugin 0.30.387 -- there is an option to display type info on hover just like eclipse. To turn it on, see

    Preferences -> Scala

    0 讨论(0)
提交回复
热议问题