-
Notifications
You must be signed in to change notification settings - Fork 106
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
Automatically selecting auto completion suggestion despite not pressing enter or tab key #357
Comments
I noticed something like this as well but I thought this is expected from |
Yeah, there are a few intersecting pieces of behavior here:
Because it was broken for so long, we didn't understand all the interactions, and the result is a broken mess: you type The only piece we have control over is the set of commit characters, so we'll try and find a sensible fix in those terms. |
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
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
Doesn't the approach taken here take control away from users, in that previously if they didn't like this behaviour they could turn off |
Strictly: no, because this never worked! (except for ~1 day, with 0.1.19) Relative to if we set the commit characters: yes, absolutely, and i think this is a problem. However if the default behavior is extremely broken, that's a big problem. Exacerbated by:
I might be wrong about this behavior being very broken - it seems jrieken likes it, there must be at least one other! @HighCommander4 did you manage to reproduce the behavior in vscode? I find it incredibly jarring, more than it looks like on paper. |
Yeah, you were right that the reason I wasn't seeing the auto-activation was due to Having now installed 0.1.18 to see what it's like, I agree that interaction between the Some of the other commit characters seem fine, though, and some like |
Please describe the problem.
For hints on what information is helpful, see: https://clangd.llvm.org/troubleshooting.html
After todays update to version 0.1.18, it automatically selects the auto completion suggestion.
For example if i write
while
and then when i open a curved bracket without clicking or selecting the while snippet suggestion, it automatically selects that snippet without my wish and finally it looks like this:There are two brackets inside while loop, one is mine and other is snippet's.
Same problem is also occuring in
if
and also many other conditions/loops etc.Logs
Please attach the clangd log from the "Output" window if you can.
If possible, run with
--log=verbose
- note that the logs will include the contents of open files!System information
Clangd version (from the log, or
clangd --version
):clangd extension version:
0.1.18
Operating system: Manjaro XFCE
The text was updated successfully, but these errors were encountered: