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

Cannot invoke signature help in or adjacent to block body #27056

Closed
DanielRosenwasser opened this issue Sep 12, 2018 · 4 comments
Closed

Cannot invoke signature help in or adjacent to block body #27056

DanielRosenwasser opened this issue Sep 12, 2018 · 4 comments
Labels
Bug A bug in TypeScript Domain: Signature Help Information in editor tooltips when invoking a function call Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this

Comments

@DanielRosenwasser
Copy link
Member

Apparently a long-standing issue, discovered from experimenting with signature help characters

declare function foo(...args);

foo(() => {/*1*/}/*2*/)

At each position, explicitly request signature help.

Expected: Signature help.
Actual: No signature help.

Ideally, we'd check whether the trigger reason was that signature help was a manual invocation, and keep walking up if so.

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: Signature Help Information in editor tooltips when invoking a function call Help Wanted You can do this Good First Issue Well scoped, documented and has the green light labels Sep 12, 2018
@sbaidon
Copy link
Contributor

sbaidon commented Sep 12, 2018

I would love to help in this, unfortunately I have no previous experience in the repo, might need some guidance

@DanielRosenwasser
Copy link
Member Author

Sure! A few things.

  1. You'll want to edit src/services/signatureHelp.ts and check for the right trigger reason ("invoked").
  2. Use whether or not "invoked" was passed in in the getContainingArgumentInfo function.
  3. Write tests in tests/cases/fourslash/. See here for some tests.
  4. The fix for this only works in VS Code Insiders (and internal builds of Visual Studio. Get yourself a copy here if you want to test that things are indeed working. You can trigger signature help with Ctrl+Shift+Space or probably Cmd+Shift+Space on Mac.

@sbaidon
Copy link
Contributor

sbaidon commented Sep 12, 2018

Thanks! Will try to get a PR ASAP

@DanielRosenwasser DanielRosenwasser added this to the Community milestone Sep 13, 2018
@sbaidon
Copy link
Contributor

sbaidon commented Sep 13, 2018

Okay I think I have a working solution, I just got confused how could I test it on VS Code Insiders?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Signature Help Information in editor tooltips when invoking a function call Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

3 participants