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

trigger parameter hints #4879

Closed
1 task done
0x2CA opened this issue Mar 22, 2023 · 12 comments · Fixed by #12909
Closed
1 task done

trigger parameter hints #4879

0x2CA opened this issue Mar 22, 2023 · 12 comments · Fixed by #12909
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] language server An umbrella label for all language servers popovers Feedback for tooltips, syntax hints, info popups, toasts, etc

Comments

@0x2CA
Copy link
Contributor

0x2CA commented Mar 22, 2023

Check for existing issues

  • Completed

Describe the feature

in vscode ,you can use Shift ⇧ + Cmd ⌘ + Space trigger
image
This is very useful, especially if I forget what arguments does the function take
I use vim mode,I would like to be able to allow auto-prompt as you type, or use a keyboard shortcut, hopefully compared to vim

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@0x2CA 0x2CA added enhancement [core label] triage Maintainer needs to classify the issue labels Mar 22, 2023
@jansol
Copy link
Contributor

jansol commented Mar 22, 2023

Is this the same thing as the LSP hover action?

@0x2CA
Copy link
Contributor Author

0x2CA commented Mar 22, 2023

yes

@0x2CA
Copy link
Contributor Author

0x2CA commented Mar 22, 2023

there is a slight difference that it can be displayed until it goes out of the scope of the function argument, and it can be switched to show all overloaded function signatures

@JosephTLyons JosephTLyons added editor Feedback for code editing, formatting, editor iterations, etc and removed triage Maintainer needs to classify the issue labels Mar 23, 2023
@JosephTLyons
Copy link
Collaborator

Hey @0x2CA, we do have a keybinding to show the hover popup, but I dont think this is quite what you are asking for?
SCR-20230323-kdip

@0x2CA
Copy link
Contributor Author

0x2CA commented Mar 24, 2023

@JosephTLyons Something like this, but this is not what I want. It should be triggered inside () and show which parameter is currently in

@hokein
Copy link

hokein commented May 8, 2023

This feature is called "Signature Help" (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_signatureHelp) -- it usually displays the signature of a method in a tooltip when a user types the parameter list start character.

It looks like it is not supported in zed yet, verified with clangd as well (I didn't see any "signatureHelp" request sent to clangd in the clangd log)

@hovsater hovsater added tooltips language server An umbrella label for all language servers labels May 8, 2023
@stevvns
Copy link

stevvns commented Nov 14, 2023

It seems quite close to #5155. The referenced issue proposes the hint to be displayed automatically while writing a function call, while this issue seems to request just some way (including manual trigger) for this hint.

Anyway, just bumping this thing up as it is super-helpful feature. Hopefully, gpui2 will help with implementing it)

Also, in discussions there was the comment suggesting that displaying documentation hints while typing is not supported. Hopefully, it would get some attention too 🙏

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@elsassph
Copy link

I was honestly surprised this feature was missing - it took me a while to find this issue.

@m4es7r0
Copy link

m4es7r0 commented Mar 19, 2024

add this to your keymap.json

[
    {
      "context": "Editor",
      "bindings": {
        "cmd-space": "editor::ShowCompletions"
      }
    }
]
image

@soham-suki
Copy link

@m4es7r0 I don't think editor::ShowCompletions is what the requirement is - we need a way to parameter hints inside the (), which this doesn't do.

@10bo
Copy link

10bo commented Jul 11, 2024

The editor should have this feature.

@SomeoneToIgnore
Copy link
Contributor

#12909 brought initial support for this feature which is almost complete but only shows a single, first signature help it gets (and also does not show description labels, just the signatures).

This works well for many languages that have no overrides, so I'll let the PR close this issue automatically and will wait for more feedback in separate issues.

This is planned to be released as part of Zed 0.145

@JosephTLyons JosephTLyons added popovers Feedback for tooltips, syntax hints, info popups, toasts, etc and removed tooltips labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] language server An umbrella label for all language servers popovers Feedback for tooltips, syntax hints, info popups, toasts, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.