Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Add Import could prioritize stdlib packages #2683

Closed
tj opened this issue Aug 3, 2019 · 4 comments · Fixed by #2803
Closed

Add Import could prioritize stdlib packages #2683

tj opened this issue Aug 3, 2019 · 4 comments · Fixed by #2803

Comments

@tj
Copy link

tj commented Aug 3, 2019

Currently the "Go: Add Import" command doesn't prioritize core packages, so you often get a bunch of random packages over-powering the standard ones. Here's a few examples:

Screen Shot 2019-08-03 at 11 10 51 AM

Screen Shot 2019-08-03 at 11 15 24 AM

It wasn't a big deal when autocompletion of core packages worked without imports, but I can't seem to get that working anymore go.autocompleteUnimportedPackages enabled — maybe a gopls issue?

@stamblerre
Copy link
Contributor

The autocompletion of unimported packages is not yet supported in gopls, but you can track updates here: golang/go#31906.

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Aug 21, 2019

Its a fair ask to sort such that the standard libraries show up first, PRs are welcome to make the change.

Code Pointers:

@ramya-rao-a
Copy link
Contributor

Please try the latest beta version of this extension has the fix for this

@ramya-rao-a
Copy link
Contributor

The latest update to this extension (0.11.8) has the fix for this.

Thanks for reporting @tj and for the fix @karthikraobr

Happy Coding!

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 19, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants