-
-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textDocument/didChange interpretation #112
Comments
alanz
added a commit
to alanz/lsp-mode
that referenced
this issue
Aug 30, 2017
For incremental change mode, all the changes in a `textDocument/didChange` message are interpreted as applying to the same version of a particular document. But each emacs change corresponds to the state of the document when the change happens. So harmonise the expectations by sending each change in its own message. closes emacs-lsp#112
alanz
added a commit
to alanz/lsp-mode
that referenced
this issue
Aug 30, 2017
For incremental change mode, all the changes in a `textDocument/didChange` message are interpreted as applying to the same version of a particular document. But each emacs change corresponds to the state of the document when the change happens. So harmonise the expectations by sending each change in its own message. closes emacs-lsp#112
wkirschbaum
pushed a commit
to wkirschbaum/lsp-mode
that referenced
this issue
Jun 1, 2021
Avoid crashing main server process in code lens request when uri is n…
wkirschbaum
pushed a commit
to wkirschbaum/lsp-mode
that referenced
this issue
Jun 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
textDocument/didChange
per emacs change, as it is reported; orThe first option is simpler, and seems to be what happens in vscode. But, it means we potentially run diagnostics generation more frequently than required.
The text was updated successfully, but these errors were encountered: