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

Show function signature while providing the arguments #3598

Open
mfronczyk opened this issue May 16, 2023 · 8 comments
Open

Show function signature while providing the arguments #3598

mfronczyk opened this issue May 16, 2023 · 8 comments
Labels
Hackathon This issue is suitable for hackathon sessions type: enhancement New feature or request

Comments

@mfronczyk
Copy link

mfronczyk commented May 16, 2023

Is your feature request related to a problem? Please describe.

When adding a function call, the extension suggests a list of functions with signatures, but when a function is selected and you start providing the parameters, the signature is not visible anymore and you need to bring the signature back sometimes for more complex functions.

Describe the solution you'd like

It'd be nice to keep the tooltip with the function signature open till you finish the call and make the current parameter bold there. It seems that the VS code extension for Idris has such feature, so maybe it'd be possible to add it here also?

Please see the Idris solution here - swr1bm86/vscode-idris@fd42429

@mfronczyk mfronczyk changed the title Show function signature while typing Show function signature while providing the arguments May 16, 2023
@fendor fendor transferred this issue from haskell/vscode-haskell May 16, 2023
@michaelpj
Copy link
Collaborator

Looks like this is textDocument/signatureHelp, which we indeed don't have an implementation for.

@fendor fendor added Hackathon This issue is suitable for hackathon sessions type: enhancement New feature or request labels May 17, 2023
@alexnaspo
Copy link
Contributor

I would be interested in working on this. I started hacking something together in ghcide but I'm wondering if this should be done within a HLS plugin?

@fendor
Copy link
Collaborator

fendor commented May 27, 2023

It could be a plugin, but also part of ghcide directly, but let's see how the implementation looks like. If you require a slew of new dependencies, likely we want it in a plugin. If it basically can be done with the existing infrastructure, it is fine.

@michaelpj
Copy link
Collaborator

Also, sorry, forgot to link to the pre-existing issue that has some discussion: #2348

@michaelpj
Copy link
Collaborator

Hmm, possibly that is slightly different. I think that might be asking to show the argument doc in the main doc for an identifier? But we definitely also want them in signature help

@michaelpj
Copy link
Collaborator

No, I think that issue is different. Signature help is triggered by the user writing a character, i.e. while they're writing the function application. If we want argument haddock to be visible afterwards then we need it to be in the hover as well.

@samuel-williams-da
Copy link

@alexnaspo I see you have a WIP branch, are you still working on this?

@alexnaspo
Copy link
Contributor

@samuel-williams-da I was having some trouble and got a bit busy so please don't let it hold up anyone else's work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hackathon This issue is suitable for hackathon sessions type: enhancement New feature or request
Projects
Development

No branches or pull requests

5 participants