Closed
Description
At the moment we accumulate changes and send them once a timer triggers.
Each emacs onChange event is wrt to the document at the point when the change is made.
This means the order of application is important, and needs to be preserved.
However
According to microsoft/language-server-protocol#279, the changes in a single textDocument/didChange
message should all be wrt the same document, and hence they need to be applied in reverse order.
So, to fix this we can either
- Send one
textDocument/didChange
per emacs change, as it is reported; or - Adjust the edit locations so that they all refer to the original document, so they can be applied according to the specification.
The first option is simpler, and seems to be what happens in vscode. But, it means we potentially run diagnostics generation more frequently than required.
Metadata
Metadata
Assignees
Labels
No labels