Skip to content
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

Send changes immediately instead of queueing them #113

Merged
merged 1 commit into from
Sep 5, 2017

Conversation

alanz
Copy link
Contributor

@alanz alanz commented 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 #112

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 alanz requested a review from vibhavp August 30, 2017 21:14
@vibhavp
Copy link
Member

vibhavp commented Sep 5, 2017

Text changes strike again, argh. I'll have to see how much of an impact does this have on performance, sending a message to the language server on every change to the buffer might slow up emacs considerably :/

@alanz
Copy link
Contributor Author

alanz commented Sep 5, 2017

It should be possible to come up with a function that can go over a list of changes and re-align them to the original state, as expected by LSP. But it would have to be tested pretty comprehensively.

And I am not sure that my elisp is up to it.

@alanz
Copy link
Contributor Author

alanz commented Sep 5, 2017

However, without this patch the incremental state in the server is guaranteed to be wrong.

@vibhavp
Copy link
Member

vibhavp commented Sep 5, 2017

Yeah, that's a big problem. I'll merge this for now, but we need to find a way to coalesce changes to a buffer.

@vibhavp vibhavp merged commit d696926 into emacs-lsp:master Sep 5, 2017
@alanz alanz deleted the no-q-didchange branch October 13, 2017 12:59
renatofdds pushed a commit to renatofdds/lsp-mode that referenced this pull request May 13, 2023
…ring

Fix docstring for lsp-java-progress-string
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.

textDocument/didChange interpretation
2 participants