Intellij Idea scala plugin automatically show the method's return type in gray which is annoying in most cases.
How to suppress this feature
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
Uncheck "Show function return type hints(Scala)"
Or simply right click on the type hints
And click on Function return type hints
Once you disable it, the former way is the only way to re-enable it.
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.
It would be interesting to have feedback about what people here think good shortcuts for this should be.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With