Skip to content
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

Add support for inlay hints #907

Merged
merged 2 commits into from Apr 2, 2022
Merged

Add support for inlay hints #907

merged 2 commits into from Apr 2, 2022

Conversation

baronfel
Copy link
Contributor

@baronfel baronfel commented Apr 1, 2022

This is most of the backend work necessary to support inlay hint display for parameter names and inferred types. It's based wholesale on @cartermp's work on dotnet/fsharp#10295.
It doesn't currently work for methods with parameters, because there's not a public version of the changes to FCS he made in that PR yet.

Next steps:

  • add tests
  • consider adding an inlayHint resolve method, since hints can have actions associated to them that may be difficult to perform
  • consider adding an action to the type-style hints to explicitly type that expr, like we have a codeaction for already (essentially invoking that code action)

@baronfel baronfel marked this pull request as ready for review April 2, 2022 16:32
@baronfel
Copy link
Contributor Author

baronfel commented Apr 2, 2022

I'm not going to do the resolve handler right now - we have no use case for it aside from the potential action to turn a type hint into an explicit type annotation in the code. Instead I'll log an issue as an up-for-grabs enhancement if someone wants to pick that up.

@baronfel baronfel merged commit 8bf4e4a into ionide:main Apr 2, 2022
@baronfel baronfel deleted the inlay-hints branch April 2, 2022 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant