tide icon indicating copy to clipboard operation
tide copied to clipboard

Display function overloads?

Open Dessix opened this issue 8 years ago • 2 comments

When the minibuffer shows something like this: image Is there a way to access the other overloads? The concept of overloads seem to be unmentioned in the source, but it's generally a piece of information I can use when in a new framework. What would need to be done to introduce this feature?

Dessix avatar Apr 03 '17 02:04 Dessix

Good question.

Looking into it, it seems the code-section involved for this is fairly small.

My initial assumption was that tide-command:signatureHelp was responsible for this. And as far as I can see from the contract, the server is supposed to return several signatures if found.

So edbugging my way through the code, I found out that the function tide-method-call-p actually doesn't trigger for our eldoc function, meaning the response we get is from the tide-command:quickinfo implementation instead.

To me this certainly looks like a bug. If we can fix this bug, getting your issue fixed too should hopefully not be too hard.

@ananthakumaran : From what I can see, this looks like your code. Do you agree with my analysis?

Edit: It seems tide-command:signatureHelp is used when inside a function signature, to help you with the individual parameters. Still the response seems more than rich enough to be able to construct a full list of signature-options for the end-user.

josteink avatar Apr 03 '17 06:04 josteink

signatureHelp returns all the different signatures. It's possible to cycle through the different signatures / show them all at once. quickinfo doesn't seem to return all the function signatures though.

ananthakumaran avatar Apr 04 '17 12:04 ananthakumaran