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 SignatureHelpProvider to provide help for method/constructor args #15

Closed
DanTup opened this issue Aug 4, 2016 · 9 comments
Closed
Labels
in editor Relates to code editing or language features is enhancement
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Aug 4, 2016

https://code.visualstudio.com/docs/extensionAPI/vscode-api#SignatureHelpProvider

@DanTup DanTup modified the milestones: 0.5.0, 0.6.0 Aug 4, 2016
@DanTup DanTup changed the title Add parameter info to completion Add SignatureHelpProvider to provide help for method/constructor args Aug 6, 2016
@DanTup DanTup modified the milestones: v1.0, v0.6 Aug 7, 2016
@DanTup
Copy link
Member Author

DanTup commented Aug 18, 2016

This isn't possible without a new feature in the Analyzer:

https://groups.google.com/a/dartlang.org/forum/#!topic/analyzer-discuss/Abh1vi1CwDA

@DanTup DanTup added external / blocked blocked on dart / flutter Requires a change in Dart or Flutter to progress labels Aug 20, 2016
@DanTup
Copy link
Member Author

DanTup commented Aug 22, 2016

@devoncarew Do you have this functionality in Atom? If so, how to do you do it?

This is the biggest remaining annoyance for me when trying to write Dart in Dart Code. I've been trying to use Hovers to get the info but failing (it's hard to know where to issue the Hover command without understanding the surrounding Dart).

@devoncarew
Copy link
Contributor

We don't support something like this. I don't know what the best options are. I think it would be a while until support for this comes to the analysis server. Two practical solutions might be to live w/o it, or to see if a heuristic w/ hovers can return info for many simple cases?

@DanTup
Copy link
Member Author

DanTup commented Aug 22, 2016

I've started trying to use hover, but held off putting too much time into it without knowing if it'd be done in the analysis server. Brian confirmed it's likely to be a while, so I'll get back to it. I think the complications are:

  1. The hover info is unstructured (just a string for all params)
  2. Need to know where to send the hover request for

I think 1 will be easy to handle except in the case where there are arguments that are themselves functions. I think 2 is probably just a case of walking back to the first paren that has an alphanumeric before it (need to check if whitespace is allowed there).

The idea of forking the AS and building our own snapshot crossed my mind too, but I've not looked at the code at all to see how easily I could implement it myself using the existing stuff on the server side. Probably would be hard for me, but always an option.

I'll play with the easier options first anyway and see where I get. Now we have args in the completion info it's a little better than it was; but I'll have to sit down to try and write something to get a better idea of how much I'll miss this.

@DanTup DanTup removed external / blocked blocked on dart / flutter Requires a change in Dart or Flutter to progress labels Aug 22, 2016
@DanTup DanTup modified the milestones: 0.10, v1.0 Aug 22, 2016
@DanTup DanTup added external / blocked blocked on dart / flutter Requires a change in Dart or Flutter to progress labels Aug 22, 2016
@DanTup DanTup modified the milestones: 0.10, v1.0 Aug 27, 2016
@DanTup
Copy link
Member Author

DanTup commented Aug 31, 2016

Haven't gotten anywhere trying to use the hover stuff yet (figuring out the correct offset to send is non-trivial), so bumping this to 0.11.

@DanTup DanTup added this to the 0.11 milestone Aug 31, 2016
@DanTup DanTup modified the milestones: v2.8.0, v3.0.0 Jan 30, 2018
@DanTup DanTup modified the milestones: v3.0.0, On Deck Feb 21, 2018
@DanTup DanTup modified the milestones: v2.10.0, v2.11.0 Mar 4, 2018
@DanTup DanTup modified the milestones: v2.11.0, On Deck Mar 14, 2018
@DanTup DanTup removed the blocked on dart / flutter Requires a change in Dart or Flutter to progress label Jul 25, 2018
DanTup added a commit that referenced this issue Jul 25, 2018
@DanTup DanTup closed this as completed in 45b7c9c Jul 26, 2018
@DanTup DanTup modified the milestones: On Deck, v2.17.0 Jul 26, 2018
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 is enhancement
Projects
None yet
Development

No branches or pull requests

3 participants