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

cmd/govim: fix completion #232

Merged
merged 1 commit into from
May 15, 2019
Merged

cmd/govim: fix completion #232

merged 1 commit into from
May 15, 2019

Conversation

myitcv
Copy link
Member

@myitcv myitcv commented May 15, 2019

https://go-review.googlesource.com/c/tools/+/176958 changed the
TextEdits returned from gopls to not be the trimmed version of the
label. This meant that we were effectively appending the entire
completion text after the prefix.

This wasn't caught in the completion tests because there we were
attempting a "naked" completion with no prefix.

Fix by fixing the test (which confirmed the bug) then fixing the results
returned from gopls.

Seemingly, a list of completion items from gopls can specify a start
position per item. This does not appear to be supported by Vim (see
:help complete-functions)

https://go-review.googlesource.com/c/tools/+/176958 changed the
TextEdits returned from gopls to not be the trimmed version of the
label. This meant that we were effectively appending the entire
completion text after the prefix.

This wasn't caught in the completion tests because there we were
attempting a "naked" completion with no prefix.

Fix by fixing the test (which confirmed the bug) then fixing the results
returned from gopls.

Seemingly, a list of completion items from gopls can specify a start
position per item. This does not appear to be supported by Vim (see
:help complete-functions)
@myitcv myitcv merged commit b7cb37e into master May 15, 2019
@myitcv myitcv deleted the fix_completion branch May 15, 2019 10:45
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.

None yet

1 participant