-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick action to explicitly annotate a let
binding parameter
#10421
Comments
Where should the action pop up? With caret within the function identifier? On a related note how are quick actions actually triggered? They don't have associated diagnostic IDs like code fixes, so does Roslyn iterate over all registered providers on every hover/caret move to see if they return anything actionable at the location? |
This would be added as a refactoring provider here: https://github.com/dotnet/fsharp/tree/main/vsintegration/src/FSharp.Editor/Refactor |
Refactoring Providers and quick fixes are different. The former is run periodically in the editor and whenever one is applicable it is triggered to run asynchronously. The latter are triggered based off of diagnostics. |
refactoring.mp4So this is half-there - works for parameters but not return types. Keeping the ticket, created a separate area for this to distinguish it from code fixes. |
I wonder if we want to fully annotate everything we can right away.
I'll close this ticket and create new ones for 2 and 3. |
let
bindinglet
binding parameter
Given code like this:
There should be a quick action available to convert it to this:
This would require some work to get the inferred types of the
let
-bound value(s) and each parameter if it's a function, and their ranges.The text was updated successfully, but these errors were encountered: