Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the method return type hint in IntellijIdea scala plugin

Intellij Idea scala plugin automatically show the method's return type in gray which is annoying in most cases.

How to suppress this feature

like image 905
Tom Avatar asked Jul 17 '18 00:07

Tom


2 Answers

This feature has been added in IntelliJ IDEA 2018.1

The editor can now show inline hints for parameter names, method result types, and variable types. You can also easily use the settings to customize when such a hint should be shown.

You can disable it from Preference -> Editor -> General -> Appearance

How to switch scala function return type hints

Uncheck "Show function return type hints(Scala)"

Or simply right click on the type hints

enter image description here

And click on Function return type hints

Once you disable it, the former way is the only way to re-enable it.

like image 54
suish Avatar answered Nov 16 '22 09:11

suish


You can create shortcuts for toggling this in Preferences > Keymap and from there follow Main Menu > Plugins > Scala > Function return type hints Or search for "hints" in the keymap settings tab. Having a good keymap to toggle this is actually really helpful - and probably most of all when reading someone else's code.Where to set the "Function return type hint" in Intellij 2019.2

It would be interesting to have feedback about what people here think good shortcuts for this should be.

like image 21
Henry Story Avatar answered Nov 16 '22 11:11

Henry Story