if I hover over `conn` further down Iโ€™d like it to...
# intellij
j
if I hover over
conn
further down Iโ€™d like it to tell me what it is
d
Not sure if I got you right, but hovering mouse cursor over some identifier while holding
Ctrl
will show short tooltip for corresponding declaration.
d
Unfortunately, it doesn't show type when hovering over variable declaration (only when hovering over usages).
๐Ÿ˜ž 1
c
You can enable parameter type hints, not exactly what you want but very useful occasionally. Settings โ†’ Appearance โ†’ Show parameter name hints. You can also configure there which hints exactly you need to be shown.
j
@Dmitry Kandalov iโ€™m not even getting that, declration made, used on next line, hover and i get nothing
aha
In Editor > General > Other (section) > Show quick documentation on mouse move - delay 500 ms
๐Ÿ‘ 2
d
@Czar parameter name and type are different things ๐Ÿค”
In general I sometimes find it useful to see actual type of
val
without type inference. This is to make sure compiler inferred the right thing, so I only want to see it for couple seconds. That's the usecase.
c
@Dmitry Kandalov Have you tried it? I'm not the one who came up with the name of the setting. It actually does this:

https://snag.gy/v0TkYa.jpgโ–พ

': Client' here is not actually in the code, it's just shown to you by IJ
d
Ah, so it's in
Settings โ†’ Appearance โ†’ Show parameter name hints โ†’ Configure... button (with Kotlin in top dropdown) โ†’ Show local variable type hints checkbox
. It works but overall IMHO for kotlin this is a useless feature because the whole point of type inference is to not show types. As mentioned I only want to see inferred types occasionally for couple seconds not all the time.
c
And IntelliJ provides you with toggle shortcut for the mentioned settings. The point is not to type the types, not not to show them. (I know the previous sentence is horrible writing :D)
d
The point is not to *type* the types, not not to *show* them.
๐Ÿ‘ˆ haha, makes sense to me, but that's not what I want ๐Ÿ™‚
What is the "toggle shortcut for the mentioned settings"?
ah, it's called
Toggle parameter name hints
in
ide settings -> keymap
, if assigned a decent shortcut this might be useful after all ๐Ÿค”
Thank you!
c
You are welcome ;)