-
Notifications
You must be signed in to change notification settings - Fork 185
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
The signature help "parentheses" detection needs more work #1001
Comments
Here are some example signature responses (for my own information mostly). {
"signatures": [
{
"label": "toggleExpand(memberId: number): void",
"parameters": [
{
"documentation": "",
"label": "memberId: number"
}
]
}
],
"activeParameter": 0,
"activeSignature": 0
} {
"signatures": [
{
"documentation": "Copy new files and directories to the image's filesystem.",
"label": "COPY [flags] source ... dest",
"parameters": [
{
"documentation": "Optional flags to configure this instruction.",
"label": "[flags]"
},
{
"documentation": "The resource to copy.",
"label": "source"
},
{
"documentation": "The resource to copy.",
"label": "..."
},
{
"documentation": "The name of the destination file or folder.",
"label": "dest"
}
]
}
],
"activeParameter": 1,
"activeSignature": 0
} I haven't checked what we are parsing them for. Is that to highlight active parameter? |
there's an issue i noticed before (i don't know if it's still there): when you are inside the parameter section of a function and and click "(" (e.g to create a tuple), signatureHelp is invoked. f(1, 2, (|)) |
Yes, there's not much we can do about that. The signature help feature works with trigger characters. Trigger characters are blunt and don't know anything about ST scopes. |
Maybe we can add a customization point in AbstractPlugin for this |
That sounds fine to me. What form would the customization have? A regexp (or a series of)? |
Just another selector in the client config would suffice I think? |
We've seen that for e.g. a dockerfile language server the parens detection doesn't work at all.
For gopls, parentheses are used after the function ends. The right decision might be to abandon this parsing. There's nothing in the spec that guarantees us parentheses of any kind.
The text was updated successfully, but these errors were encountered: