-
Notifications
You must be signed in to change notification settings - Fork 821
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
completionItem snippets conflict with signatureHelp #274
Comments
As @jrieken explained to me on the other thread, solution 2 can be accomplished now simply by setting the command |
I.m.o. using a 'built-in' command in this way isn't a equivalent to your 'solution 2'. There is no list of built-in commands that can be relied upon across language server client implementations. So, this means, the 'solution 2' is then limited to language server clients that implement that particular command. My objections would, of course, be resolved if LSP dictated a set of built-in commands that every language-server client should implement. |
See latest comment in microsoft/vscode#78806 (comment) |
It would be nice to have a solution to this problem (and I've been looking at implementing a workaround), but the idea proposed in microsoft/vscode#78806 doesn't work well so I wouldn't be happy to see it added to LSP. If the completion item has I think editors already have enough info to infer the right behavior, namely that preceding non-whitespace characters |
When implementing a java language server, it would be nice to be able to activate signatureHelp immediately, without a trigger character. Suppose for example the user has typed:
We would like to autocomplete
someValue.someMethod()
and place the users cursor between parentheses. This is possible using snippets:The problem is that signatureHelp relies on the trigger character
(
, and it doesn't get activated when the(
is inserted as part of the snippet.This problem does not come up in languages like Typescript, because the expression
someValue.someMethod
is well-defined as a reference tosomeMethod
. But in Java, method references have a different syntaxsomeValue::someMethod
. So we know the user will always type(
, but we don't autocomplete it.There are two possible solutions to this, one at the VSCode level and one at the language-server-protocol level:
$0
in a snippet is a signatureHelp trigger character, activate signatureHelp.CompletionItem { ... activateSignatureHelp: boolean }
that activates signature-help immediately following completion.The text was updated successfully, but these errors were encountered: