Skip to content

Client should report current value of activeSignature to signatureHelpProvider #33413

Closed

Description

@KamasamaK
  • VSCode Version: 1.15.1
  • OS Version: Windows 10 Pro, version 1703 (x64)

Steps to Reproduce:

  1. Trigger signature help with multiple signatures
  2. Manually change active signature
  3. Type a non-separator character
  4. Watch it revert to previously active signature

Reproduces without extensions: N/A

With the current value of activeSignature in the request, the signatureHelpProvider could more intelligently decide what the activeSignature value should be in its response. This is especially the case when both arguments are not reasonably distinct enough for the provider to otherwise determine the active signature and must make it arbitrary.

Ref: #16256

Activity

  1. added
    feature-request
    and removed on Aug 30, 2017
  2. MofX commented on Jan 18, 2018

    @MofX

    I also really like to see this feature:
    Not only from a language extension developer's perspective, but also from a user's perspective:
    If i manually select one overload, I'd like it to stick, until I'm finished typing the call.
    When looking at a complete function call, it is no problem to not have this, because then the overload should be deducible, but while I'm typing in, I might like to see the overload I am about to use.

    This is especially true for the language I am working on (some internal markup language), where only the final number of parameters allows deduction of the used overload.

    For all scenarios that I could think about, to be satisfy-able, the SignatureHelpProvider needs to know, if the user manually selected an overload and the number of this overload

  3. KamasamaK commented on Jul 10, 2018

    @KamasamaK
    Author

    This could be made part of the new SignatureHelpContext proposed in #51731

  4. jrieken commented on Jul 10, 2018

    @jrieken
    Contributor

    Yeah, we can think of that. What exactly do you need KamasamaK?

  5. KamasamaK commented on Jul 10, 2018

    @KamasamaK
    Author

    Johannes Rieken (@jrieken) I would like the activeSignature value in the SignatureHelpContext. As described in the opening comment, the provider must return activeSignature but currently has to do so without knowing what the current value is in the client (if it has one).

  6. added
    editor-parameter-hints
    and removed
    feature-request
    on Dec 13, 2018
  7. mjbvz commented on Dec 19, 2018

    @mjbvz
    Contributor

    One complication is the case where there are multiple active signature help providers. In this case, the activeParameter /activeSignature alone likely isn't enough, since the provider needs a way to know if it was the one that returned the previous signature help

    We could pass back the entire SignatureHelp object to support this

  8. jrieken commented on Dec 20, 2018

    @jrieken
    Contributor

    One complication is the case where there are multiple active signature help providers.

    Not sure I understand that. Don't we always take the first provider that has a result?

    https://github.com/Microsoft/vscode/blob/6bbf94c2f16a6c2150dd9789f97f44f6f17cff35/src/vs/editor/contrib/parameterHints/provideSignatureHelp.ts#L20-L27

  9. mjbvz commented on Jan 7, 2019

    @mjbvz
    Contributor

    Fixed by #65440 which introduces a new activeSignatureHelp field on the SignatureHelpContext object. This new field is proposed API for December/January

    Please share any feedback or concerns about the current api proposal

  10. locked and limited conversation to collaborators on Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apiapi-proposaleditor-parameter-hintson-testplan

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions