Open
Conversation
LSP v3.17 added support for pull-model diagnostics which are modeled as a “report” that is either a full set of diagnostics for a document (and related documents) or “unchanged”. We can convert these to the push model by “pulling” the diagnostics like we were already doing before and inspecting the report before pushing diagnostics to the client.
Now that the language service represents diagnostics using the pull model we can add explicit support for this to the server itself.
If we’re connected to an older client that doesn’t support the pull model we must push them to it.
a35bfe5 to
ef17e39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In May 2022, LSP v3.17 added support for pull-model diagnostics which are modeled as a “report” that is either a full set of diagnostics for a document (and possibly related documents) or “unchanged”.
Internally, we'll model all diagnostic requests using the new pull model — including in most of our tests. For clients that support it we'll pass the report back out directly. For clients that do not we can convert these to the push model by pulling the diagnostics like we were doing before and inspecting the report before pushing diagnostics to the client.
See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics