Skip to content

[Discussion] Fix incremental #124

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

Closed
wants to merge 3 commits into from
Closed

[Discussion] Fix incremental #124

wants to merge 3 commits into from

Conversation

alanz
Copy link
Contributor

@alanz alanz commented Oct 6, 2017

This uses the before-change hook to store the original start and end positions, and then takes the end position from that if a delete change must be generated.

The emacs documentation warns that the before and after events may not bracket, and may not be the same.

We do a sanity check on them before using, and if there is a mismatch send a full sync instead.

alanz added 2 commits October 4, 2017 23:26
Hooks in place, logging to *Messages*, store the before change value
@alanz
Copy link
Contributor Author

alanz commented Oct 6, 2017

Closes #114

We can sometimes get a combined delete and add
@vibhavp
Copy link
Member

vibhavp commented Oct 7, 2017

How would we do a full sync? I don't think we can change the sync method once it has been set during initialization.

@alanz
Copy link
Contributor Author

alanz commented Oct 9, 2017

When I say full sync I mean this: https://github.com/emacs-lsp/lsp-mode/blob/fix-incremental/lsp-methods.el#L627

Send an incremental change message, but with the entire contents of the buffer. Hopefully this will only be needed rarely, and makes sure the server state matches.

@vibhavp
Copy link
Member

vibhavp commented Oct 10, 2017

Ah, I forgot that range and rangeLength can be omitted. Is there anything left to be done? Otherwise, it looks good.

@alanz
Copy link
Contributor Author

alanz commented Oct 10, 2017

I have been using it myself, and it seems to work fine. So I am happy to go with it.

@vibhavp
Copy link
Member

vibhavp commented Oct 10, 2017

Squashed commits and pushed manually, thanks!

@vibhavp vibhavp closed this Oct 10, 2017
@alanz alanz deleted the fix-incremental branch October 11, 2017 18:09
wkirschbaum pushed a commit to wkirschbaum/lsp-mode that referenced this pull request Jun 1, 2021
* Update changelog for workspace symbol

* Update changelog for 0.3.0 release

* Version bump for v0.3.0
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.

2 participants