Fsharp: Quick info toolbar/code lens from VFPT (VS2015) in VS2017

Created on 17 Mar 2017  路  4Comments  路  Source: dotnet/fsharp

This is an enhancement request.

VFPT in VS2015 provides a very handy quick info toolbar that shows the function signature and is clickable for copy&paste.

quickinfotoolbar

It would be very nice to have the same quick info toolbar and/or codelens style signatures in Visual F# Tools as well in VS2017.

  • Win10
  • Visual F# Tools 15.4.1.17031503
  • Visual Studio 2017 RTW
Area-IDE Language Service Feature Request

Most helpful comment

I started porting it from VFPT (https://github.com/vasily-kirichenko/visualfsharp/commit/b07ce7b1a4c2c2d62eb49f20e2e629ff34dac022), but it uses the old way of watching text buffer change, throttling events, getting cursor position and source text via raw VS API and so on. We should not do it. We should find a proper, Roslyn-powered way to do it.

All 4 comments

I started porting it from VFPT (https://github.com/vasily-kirichenko/visualfsharp/commit/b07ce7b1a4c2c2d62eb49f20e2e629ff34dac022), but it uses the old way of watching text buffer change, throttling events, getting cursor position and source text via raw VS API and so on. We should not do it. We should find a proper, Roslyn-powered way to do it.

Yes, it does seem complicated. If Roslyn is the way to go forward that's best.

Looking at Roslyn, it also uses Caret.PositionChanged event everywhere.
However, Roslyn does take care of reanalyzing when needed. It would be great to get some callback whenever we have fresh results.

This is an important missing piece for me. Note that the VFPT feature is actually advertised as showing errors, not types, but on my machine it shows types and not errors, and that's what I find the most useful. However, this means I need reach over to the mouse and hover over errors. Ideally, both types and errors should be shown.

Was this page helpful?
0 / 5 - 0 ratings