-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix LSP ComplitionTriggerKind
value for TriggerKind::Auto
#9660
Fix LSP ComplitionTriggerKind
value for TriggerKind::Auto
#9660
Conversation
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.
ok the vscode code is pretty opaque but you are right that indeed we should be sending invoked for identifier triggered auto completions. I find that a bit odd but oh well. The implementation is not correct tough. The completion debouncer runs in a background task/thread. Even if the completion was originally caused by autocompletion we could now be at a trigger char (or not anymore).
So we should not be looking at trigger.kind
beyond checking if it is set to manual. You should determine whether to use INVOKED
or TRIGGER_CHARACTER
by checking if trigger_char.is_some()
8fb0f75
to
7631308
Compare
Yeah, I tried to go through it yesterday night but wasn't very confident. But I was to able to confirm the behavior by enabling debug logs for both
Makes sense, updated the PR. |
Spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionTriggerKind
See the related issue for more details.
Fixes: #9656