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/gopls: VSCode user snippets not sorting properly #35782

Closed
muirdm opened this issue Nov 22, 2019 · 4 comments
Closed

x/tools/gopls: VSCode user snippets not sorting properly #35782

muirdm opened this issue Nov 22, 2019 · 4 comments
Labels
Milestone

Comments

@muirdm
Copy link

@muirdm muirdm commented Nov 22, 2019

Imported from microsoft/vscode#84587

In https://go-review.googlesource.com/c/tools/+/202717 I added a workaround so our completion candidate order was maintained in VSCode. I made all gopls candidates appear to be "perfect" so VSCode had no additional sorting/filtering to do. This, however, made gopls candidates always match better than other VSCode completion items, such as user snippets.

@gopherbot gopherbot added this to the Unreleased milestone Nov 22, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 22, 2019

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 22, 2019

Change https://golang.org/cl/208439 mentions this issue: internal/lsp: improve completion ordering workaround

@muirdm

This comment has been minimized.

Copy link
Author

@muirdm muirdm commented Nov 22, 2019

@tj The above change should resolve the issue. Are you able to test it out? Rough steps are:

  1. Clone https://github.com/golang/tools
  2. Grab https://go-review.googlesource.com/c/tools/+/208439/ ("Download patch" from upper right "..." menu)
  3. cd gopls; go install
  4. Confirm above built gopls binary is first in your PATH
  5. Developer: Reload Window in VSCode
@tj

This comment has been minimized.

Copy link

@tj tj commented Nov 22, 2019

Awesome! That fixed it, thanks a lot, I didn't realize the language server is in charge of so much, I'll keep that in mind next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.