-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: Implement diagnostics pull model #18404
Conversation
0665d41
to
bf60937
Compare
Okay implementing this is rather straight forward actually, that's nice |
bf60937
to
8b59541
Compare
I know this should be a separate issue but for now I don't have time for that so just gonna point at sublimelsp/LSP#2572 Basically, there appears to be some issues with the implementation - the server still pushes diagnostics even if client supports pull diagnostics and also it returns empty diagnostics for pull request. |
This is intentional, the native rust-analyzer diagnostics support the push model, but the on save document handler that invokes cargo check remains using the push model as pulling makes little sense in that way (cargo is inherently pushing). The LSP does not forbid (to my knowledge) both to be used. |
According to the comments in microsoft/language-server-protocol#1743 (comment) servers should not use both pull and push diagnostics at the same time (at least for a particular DocumentUri; what you are allowed to do is to register pull diagnostics only for certain URIs and then use push diagnostics for different URIs):
(though I think it was forgotten to add this last sentence to the specs explicitly) Furthermore, since you don't seem to register an |
Fixes #18375