Open vzarytovskii opened 1 month ago
Just hovering over external symbol, (not just operators) while holding Ctrl causes VS (Roslyn?) to call IFSharpGoToDefinitionService.FindDefinitionsAsync
.
Which in turn calls NavigateToExternalDeclarationAsync
:
Somehow this doesn't happen that often with vsix built from main, but I can repro this in debug mode each time.
Yeah, that's definitely either VS or Roslyn. @CyrusNajmabadi is it something you can control?
Are they clicking while holding Ctrl? If so, this is by design. Ctrl-click navigates you to the thing under the caret.
I believe there is a setting for this in vs if the user doesn't like that behavior.
Are they clicking while holding Ctrl? If so, this is by design. Ctrl-click navigates you to the thing under the caret.
I believe there is a setting for this in vs if the user doesn't like that behavior.
I believe it's just hovering, @majocha may confirm/deny it.
Yes, it's just hover.
More interestingly, if you enable "View > Code Definition Window", the unwanted navigation can happen just with typing.
For example:
Type Console.Out
. Move the cursor back with left-arrow, and bam, navigation to metadata.
I suspect the problem is that our code path for external symbols ends up calling NavigateToExternalDeclarationAsync
instead of just returning a FSharpNavigableItem
array.
VS calls IFSharpGoToDefinitionService.FindDefinitionsAsync
-> the symbol is external -> we end up here:
I'm getting unwanted navigation when holding
Ctrl
and hovering over operators like&&
or>
. Not sure if caused by this PR or a bug in VS.Originally posted by @kerams in https://github.com/dotnet/fsharp/pull/17047#issuecomment-2068051467