-
Notifications
You must be signed in to change notification settings - Fork 245
Signature help should not appear on the function name #1997
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
base: main
Are you sure you want to change the base?
Conversation
ab6f404 to
afd3a00
Compare
|
Thank you for the PR |
PizieDust
left a comment
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.
Thank you for this work @Lucccyo
9b82c93 to
25ac81b
Compare
voodoos
left a comment
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.
Thanks @Lucccyo. Looks quite good, just a suggestion about a more generic api to compare the Msource's positions.
| active_param = Option.value ~default:0 s.active_param; | ||
| active_signature = 0 | ||
| } | ||
| if (Msource.compare_logical (Msource.get_logical source position) (Msource.get_logical source s.function_position)) < 0 then None |
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.
This line being too long hints that the api for Msource.compare_logical is not great.
Let's have a Msource.compare_position : Msource.position -> Msource.position -> int instead.
You can also put that as a guard in the pattern matching, I think it will make the intent clearer.
Merlin displays a
signature-helpresponse on every part of a function call, including the function name.However,
signature-helpshould appear only on function parameters.The
signature-helpcommand should not return an answer for function names.