Ensure document state synchronization before client requests#2017
Merged
dbaeumer merged 8 commits intomicrosoft:gh-pagesfrom Mar 31, 2025
Merged
Ensure document state synchronization before client requests#2017dbaeumer merged 8 commits intomicrosoft:gh-pagesfrom
dbaeumer merged 8 commits intomicrosoft:gh-pagesfrom
Conversation
Copy this [discussion](microsoft#2011 (comment)) to the document
signatureHelp and didChange
dbaeumer
reviewed
Sep 13, 2024
|
|
||
| The document change notification is sent from the client to the server to signal changes to a text document. Before a client can change a text document it must claim ownership of its content using the `textDocument/didOpen` notification. In 2.0 the shape of the params has changed to include proper version numbers. | ||
|
|
||
| Before requesting information from the server (e.g., `textDocument/completion` or `textDocument/signatureHelp`), the client must ensure that the document's state is synchronized with the server to guarantee reliable results. |
Member
There was a problem hiding this comment.
I think we need to make this more concrete since this sentences allows for interpretation as well (e.g. another change occurers before the client sends the request). So in a sequence
<document change one><code complete><document change two> the client needs to sync <document change one> to the server before requesting code compltion but not document change two.
Contributor
Author
There was a problem hiding this comment.
Sure. I added your example with a timeline table
Contributor
Author
Hi, is there anything I can improve on in my PR? |
Bunggie
approved these changes
Mar 30, 2025
dbaeumer
approved these changes
Mar 31, 2025
lszomoru
approved these changes
Mar 31, 2025
Contributor
Author
|
Wow thanks for your great work, as a language server developer it's my pleasure to contribute to this protocol :) |
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.
Copy this discussion to the document.
This content could help language server developers to safely handle signature help and completion requests after the compilation and I think the compilation is usually triggered by
didChangeevent.