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
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@muirdm
Copy link

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
Copy link

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 gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 22, 2019
@gopherbot
Copy link

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

@muirdm
Copy link
Author

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
Copy link

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.

@golang golang locked and limited conversation to collaborators Nov 21, 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. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants