Skip to content

Conversation

@baronfel
Copy link
Member

@baronfel baronfel commented Apr 1, 2022

This is the second PR for the Inline Hints feature (the first is here). It contains only the Visual Studio changes, updated to the latest compiler main branch. No other changes have been made.

Per #10295, the following changes still need to be made:

  • Setting to respect key binding
  • Setting for colors
  • Setting for type hints
  • Setting for parameter name hints

@baronfel baronfel mentioned this pull request Apr 1, 2022
Note the following behavior:

* Type hints are at definition/binding, not use
* Type hints do not show if something already has an annotation
* Parameter name hints appear for F# functions and methods, using the named argument syntax
* Named parameters get no hints
* Lambdas that are let-bound will have a type hint, but other let-bound F# functions will not

Out of scope:

* Type hints for "normal" function declarations.
  * It just looks bad and there isn't a good way to play hints without getting smushed together with the type hint for the last parameter.
  * Lambda function declarations, yes.
* Show inferred types for _ in a pattern
  * Note - this can be done orthogonally and also support quickinfo
* Add QuickInfo -
  * Note, this can be done orthogonally.
  * We need a way to resolve the symbol we're showing the type for and get quickinfo from
  * No such API exists in the compiler today
@baronfel baronfel force-pushed the inlinehints-vs branch 6 times, most recently from 9da01f0 to 24e03ed Compare April 2, 2022 15:21
This hooks up Inlay Hints to the editor via a new InlineHintsService.
@dsyme
Copy link
Contributor

dsyme commented Apr 6, 2022

What are the ergonomics of this? Is there a key combination to show the hints? Or are they on by default?

Thanks!

@dsyme
Copy link
Contributor

dsyme commented Apr 6, 2022

I merged in main so reduce the apparent diff

@baronfel
Copy link
Member Author

baronfel commented Apr 6, 2022

We'd need to hook up options - maybe something from Roslyn would help as a pattern?

@vzarytovskii
Copy link
Member

@baronfel we, perhaps, can take care of this as part of our lens work by @psfinaki
I will, for the time being, convert it to draft.

@vzarytovskii vzarytovskii added this to the Backlog milestone Oct 17, 2022
@vzarytovskii vzarytovskii marked this pull request as draft October 17, 2022 07:58
@psfinaki
Copy link
Contributor

@vzarytovskii this is a good start and the right way to go. But I'll rather somewhat incorporate this into my changes I'm working on, then will probably close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants