-
Notifications
You must be signed in to change notification settings - Fork 233
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
Signature help #1286
Signature help #1286
Conversation
Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
; active_param : int option | ||
} | ||
|
||
(* extract a properly properly parenthesized identifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(* extract a properly properly parenthesized identifier | |
(* extract a properly parenthesized identifier |
Typo. oops.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started reading the changes, and I am wondering why you chose to return both the function signature as a string and the arguments offsets in that string. Wouldn't it be more simple to simply return the list of the arguments and then on the editor side you just print each argument with the correct style ?
The function needs to build the string in order to get the parameter offsets. There's some complexity in the printing (like unwrapping option types), that I wasn't sure was appropriate to do from the editor side. |
@mnxn before thinking about how we could improve and merge that PR I would like it would be good to have it's expected behaviour to be illustrated in a series of tests. Could you add some to the merlin test-suite ? (you can take example from type-enclosing/type-alias.t for example) The first cases that I can think about are:
I noticed some weird behaviour while using vscode, I while try to take notes next time it happens to write more specific tests. Thank you ! |
My understanding is that to write a test like that example I would first need to expose the signature help functionality to the command line interface through the Is that correct? |
Yes it is correct, and that's also required for a new Merlin feature: we eventually want it to be available for every Merlin's client and that means adding it to the protocol. |
Closing for now since this has been re-implemented downstream using Merlin as a library. |
This series of patches were applied in LSP to provide signature hinting when a user types a function application. It would be much more convenient for us if they were upstreamed.
cc @mnxn