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 for (unnamed) parameter names #3609

Closed
ghost opened this issue Oct 12, 2021 · 6 comments
Closed

Add support for Inlay Hints for (unnamed) parameter names #3609

ghost opened this issue Oct 12, 2021 · 6 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is enhancement relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone

Comments

@ghost
Copy link

ghost commented Oct 12, 2021

Hello,
We would all like to see the support for inlay hints.
There isn't much to say here, everything is more or less self explanatory.

@ghost ghost added the is enhancement label Oct 12, 2021
@DanTup DanTup changed the title Add support for Inlay Hints Add support for Inlay Hints for (unnamed) parameter names Oct 12, 2021
@DanTup
Copy link
Member

DanTup commented Oct 12, 2021

In your previous screenshot there were two places inlay hints were being used:

  1. At the call site of functions, to show the names of arguments (that are not already named)
  2. Were types are being inferred and not present in the source code

Although both use inlay hints, the implementation of these is quite separate and I think make sense to track separately (for example one could be shipped without the other).

I've updated the name of this issue to assume the first - it's worth filing a separate issue about the other one too.

Right now, use of Inlay Hints is blocked on LSP support which is in progress at microsoft/language-server-protocol#956.

@DanTup DanTup added this to the Backlog milestone Oct 12, 2021
@DanTup DanTup added blocked on vs code / lsp / dap Requires a change in VS Code to progress in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server labels Oct 12, 2021
@RedyAu
Copy link

RedyAu commented Jan 31, 2022

I would like to second this issue, would be very useful. VSCode has an inlay hints setting now; maybe the situation has changed since?
image
Enabling this has no effect for .dart files.

@DanTup
Copy link
Member

DanTup commented Jan 31, 2022

@RedyAu Dart uses LSP, so nothing could be started on this until it's been available in LSP:

microsoft/language-server-protocol#956

@sanathusk
Copy link

sanathusk commented Jul 6, 2022

The VS Code API has been finalized: microsoft/vscode#16221 (comment). I would love to see the feature implemented in vscode for dart .Vscode already supports it for JavaScript & typescript.

@DanTup DanTup removed the blocked on vs code / lsp / dap Requires a change in VS Code to progress label Jul 7, 2022
@DanTup DanTup modified the milestones: Backlog, v3.50.0 Sep 12, 2022
@DanTup
Copy link
Member

DanTup commented Sep 14, 2022

Start working on this at https://dart-review.googlesource.com/c/sdk/+/259181/.

Sep-14-2022 10-42-24

It's in the language server, so will become part of a future Dart/Flutter SDK release rather than a Dart-Code release.

@DanTup DanTup added the relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available label Sep 14, 2022
@DanTup
Copy link
Member

DanTup commented Sep 14, 2022

Landed in dart-lang/sdk@15dfda9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is enhancement relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Projects
None yet
Development

No branches or pull requests

3 participants