Skip to content

Support incremental updates in textDocument/didChange handler #1651

@anderseknert

Description

@anderseknert

Our server configuration currently tells the client to only send the full document on changes:

Change:    1, // TODO: write logic to use 2, for incremental updates

Rather than a TODO comment, I'm creating this issue for tracking :) When we support incremental text sync, it means we'll only get the full document sent once (on textDocument/didOpen) and then will be sent patches only from subsequent edits. This is obviously more efficient as much less data needs to be sent... but it is also more complex to handle correctly.

Another benefit of having patches sent is that we then also get to know where the users is doing edits, and can take that into account when we for example determine whether to show a parse error directly, or with some delay (where the user is actively editing).

Metadata

Metadata

Assignees

No one assigned

    Labels

    language serverIssues related to Regal's language server

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions