Parameter Hints In IDEs

I started learning F# in Visual Studio, then bounced back and forth to Rider. I eventually became used to a rather poor Intellisense experience. When calling a function, I frequently hover my mouse over the method to see its signature in the tooltip.

Watching a video just now, I see that VSCode has proper method hints:
image

And a very useful info panel:

Am I missing something? Where is this basic functionality in my paid, annual subscription IDE’s?

I see similar hints in Rider by default when hovering over function names:

You can summon rendered docs when the cursor is inside map if you press F1 (Mac) or Ctrl+Q (Windows) or choose View → Quick Documentation:

I use IdeaVim and bind “Quick Documentation” to gh (for “get help”) so I can bring that up without moving the mouse. (You can configure IdeaVim via an .ideavimrc. Here’s the line in my config to show the doc popup.)

Rider also gives docs for the highlighted suggestion in a list. The right-hand panel here appears after a delay of 1000ms by default, which you can change at Editor → General → Code Completion → “Show the documentation popup in x ms”:

I don’t think there’s an equivalent to the info panel, though — that does look really useful. I use Dash or Zeal to summon quick docs for other languages (Dash has Rider/IntelliJ integration), but I haven’t found up to date Dash-compatible docs for F# yet.

As a workaround you can just type the namespace/module name up to the dot, then see suggestions for all methods in that namespace, with popup docs for each:

Yes, VS and Rider both have those, but not the c# style of method hints I saw in the Ionide video (updates as you type):
image

In VS and Rider, the method signature disappears as soon as you hit space. You have to return the carat or cursor back to the function name to pull it up again which is my frustration.

And the Rider quick doc popup is useless. You have to place the carat on the method name, then it steals focus from the editor and shows everything but the thing I want, i.e. a type sig of 'a -> ('b -> 'c) -> 'd.

I see similar parameter hints in Rider after a short delay:

I tried the same in VS Code with Ionide and it does seem more responsive, with full docs instead of type information only.

Might be worth filing something in YouTrack with some suggested improvements.

Ok, so it only works for the first parameter *if you wrap that param in parenthesis.

I wrote up an idea and put on youtrack if you guys want to vote for it:
https://youtrack.jetbrains.com/issue/RIDER-54038

1 Like

Excellent — thanks for doing that, @EricM81. I upvoted it.

I also spotted a tweet this morning from @cartermp about parameter hints after typing a space (instead of having to use parentheses). So you’re not the only one who wants this!

It sounded like he hoped to move this into the compiler service so that more IDEs could benefit from it. Feels like a great move.

1 Like