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

ParameterInformation.documentation is not populated in textDocument/signatureHelp #1291

Open
yyoncho opened this issue Nov 25, 2019 · 4 comments

Comments

@yyoncho
Copy link
Contributor

yyoncho commented Nov 25, 2019

Reference: https://github.com/eclipse/eclipse.jdt.ls/blob/6a4834a81206d3001bd6b170047d4606a7c4909f/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/contentassist/SignatureHelpRequestor.java#L140

Also, in the new version of the spec the label might be [number, number] which is more precise since it removes ambiguity when you want to mark the active parameter in the signature label.

@fbricon
Copy link
Contributor

fbricon commented Nov 27, 2019

@NikolasKomonen you wanna take a look?

@datho7561 datho7561 moved this to 📋 Sprint Backlog in IDE Cloudaptors Feb 14, 2023
@datho7561
Copy link
Contributor

I'm interested in taking a look at this.

@datho7561
Copy link
Contributor

VS Code seems to display both the method documentation and the parameter documentation with no separator between them when you provide both. I don't know how other clients will treat it, though.

It seems like a matter of preference which we support. If we want to be able to match what TypeScript is doing in VS Code, we could switch to the parameter documentation, but several other language servers like rust-analyzer and gopls just show the full method documentation like we currently have.

Personally, I like having the documentation for just the given parameter open when filling in the arguments for a function, because I can always hover the method name if I want the full documentation, but depending on how this works in other clients it might make more sense to stick with what we have.

I'll open a draft demonstrating the behaviour with just the parameter documentation.

@rgrunber
Copy link
Contributor

If this allows us to enable some form of signature help description, it might be worth it. See redhat-developer/vscode-java#2404 (comment) .

@datho7561 datho7561 moved this from 📋 Sprint Backlog to 🏗 In progress in IDE Cloudaptors Mar 1, 2023
datho7561 added a commit to datho7561/eclipse.jdt.ls that referenced this issue Mar 6, 2023
Use per-parameter documentation in signature help
instead of giving the entire method documentation.

Closes eclipse-jdtls#1291

Signed-off-by: David Thompson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants