Skip to content

Conversation

@imbant
Copy link
Contributor

@imbant imbant commented Sep 11, 2024

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 didChange event.

@imbant imbant changed the title Add description about the order of signatureHelp and didChange Ensure document state synchronization before client requests Sep 12, 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.
Copy link
Member

@dbaeumer dbaeumer Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I added your example with a timeline table

Copy link
Member

@dbaeumer dbaeumer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

@imbant
Copy link
Contributor Author

imbant commented Sep 20, 2024

See comment

Hi, is there anything I can improve on in my PR?

@dbaeumer dbaeumer enabled auto-merge (squash) March 31, 2025 06:34
@vs-code-engineering vs-code-engineering bot added this to the April 2025 milestone Mar 31, 2025
@dbaeumer dbaeumer merged commit a2028be into microsoft:gh-pages Mar 31, 2025
2 checks passed
@imbant
Copy link
Contributor Author

imbant commented Mar 31, 2025

Wow thanks for your great work, as a language server developer it's my pleasure to contribute to this protocol :)

@imbant imbant deleted the imbant-signatureHelp branch March 31, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants