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
Support allCommitCharacters even if the client announces commit characters per item. #673
Comments
This can only be used for clients that don't support individual commit character on individual completion items.
Since VS Code supports individual commmit characters per completion item it will not honor this during registration. |
Is this OK for you? |
@dbaeumer I think the wording on the spec should be clearer if it will only be used by clients that don't support it. Right now it seems like clients can use both. But - is there any reason this can't be supported? The payload size for completion is already quite a real issue and duplicating the same array on every single item is needlessly wasteful. It would be much nicer if this could be supported (either here on the registration, or on a single property for the whole completion list) IMO. |
Technically there is nothing that prevents us from implementing it. It is simply not done. |
btw, in the spec it has this:
This reads like it's reasonable to provide both, and that the client would fall back to |
The use of commit-characters in clangd had good intentions, but it has terrible UX in practice in VSCode, as documented on the linked bug. We didn't notice this until it was far too late: the commit characters were added in clangd 12, but bugs in vscode-languageclient prevented them from being noticed until languageclient-8. (microsoft/vscode-languageserver-node#673) At this point we can't go back and change the server behavior so we need to override it on the client. Fixes clangd#357
This was added in 2a095ff, however it never worked with VSCode due to bugs in vscode-languageclient (microsoft/vscode-languageserver-node#673). Now that it does work, we can tell the interactions with text editing, with snippets, and vscode's select-first-completion behavior are bad. The spec is vague and clients could do something reasonable with the current values. However they could clearly do something unreasonable too, and over time behavior+spec tends to converge on VSCode's behavior. This addresses clangd/vscode-clangd#358 See also clangd/vscode-clangd#358 which hotfixes this on the client-side (as we can't apply this change retroactively to clangd 12-14). Differential Revision: https://reviews.llvm.org/D129579
The use of commit-characters in clangd had good intentions, but it has terrible UX in practice in VSCode, as documented on the linked bug. We didn't notice this until it was far too late: the commit characters were added in clangd 12, but bugs in vscode-languageclient prevented them from being noticed until languageclient-8. (microsoft/vscode-languageserver-node#673) At this point we can't go back and change the server behavior so we need to override it on the client. Fixes #357
… item when enabled Setting commit characters on the registration is now enough to apply to all items (see microsoft/vscode-languageserver-node#673). Change-Id: I1133005773e63f563d4e303af60f6c5bb56ec826 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251546 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This was added in 2a095ff6f5028b76, however it never worked with VSCode due to bugs in vscode-languageclient (microsoft/vscode-languageserver-node#673). Now that it does work, we can tell the interactions with text editing, with snippets, and vscode's select-first-completion behavior are bad. The spec is vague and clients could do something reasonable with the current values. However they could clearly do something unreasonable too, and over time behavior+spec tends to converge on VSCode's behavior. This addresses clangd/vscode-clangd#358 See also clangd/vscode-clangd#358 which hotfixes this on the client-side (as we can't apply this change retroactively to clangd 12-14). Differential Revision: https://reviews.llvm.org/D129579
'm using the client library here for LSP support in a VS Code extension. My server is sending a dynamic registration that includes commit characters like this:
However pressing the commit characters doesn't seem to have any effect. It's enabled in VS Code and it works as expected for TypeScript. Is there anything else I need to do?
The text was updated successfully, but these errors were encountered: