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

x/tools/cmd/gopls: add support for handling deltas in DidChange #31800

Closed
myitcv opened this issue May 2, 2019 · 3 comments
Closed

x/tools/cmd/gopls: add support for handling deltas in DidChange #31800

myitcv opened this issue May 2, 2019 · 3 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Milestone

Comments

@myitcv
Copy link
Member

myitcv commented May 2, 2019

This is a tracking issue for adding support for handling deltas in textDocument/didChange.

https://github.com/Microsoft/language-server-protocol/blob/gh-pages/specification.md#didchangetextdocument-notification-arrow_right

Currently clients are required to send the entire file contents for each change. This starts to get noticeable for large-ish files.

cc @stamblerre @ianthehat

@myitcv myitcv added the gopls Issues related to the Go language server, gopls. label May 2, 2019
@gopherbot gopherbot added this to the Unreleased milestone May 2, 2019
@ianthehat
Copy link

If you set `incrementalSync=true' in the initialize params it will be enabled. We will enable it by default when we have reasonable confidence that it works properly (I have had it enabled for a while now and it seems to be okay)

@myitcv
Copy link
Member Author

myitcv commented May 8, 2019

Thanks - I'm still waiting on a change on the Vim side to be able to do this (without workarounds) vim/vim#4191

@gopherbot
Copy link

Change https://golang.org/cl/174949 mentions this issue: internal/lsp: fix incremental updates and turn them on

muirdm pushed a commit to muirdm/tools that referenced this issue May 12, 2019
Updates that only add text have a start and end that are the same, we were
erroring on those and failing to apply the changes.

Fixes golang/go#31800

Change-Id: Ia31b90f108742e5532d2da35137c347c26090a6a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/174949
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@golang golang locked and limited conversation to collaborators May 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Projects
None yet
Development

No branches or pull requests

3 participants