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

Browse selected package #330

Closed
kdeenanauth opened this issue May 16, 2016 · 13 comments
Closed

Browse selected package #330

kdeenanauth opened this issue May 16, 2016 · 13 comments

Comments

@kdeenanauth
Copy link

It would be handy to be able go to an import, similar to how ctrl + click works.

@ramya-rao-a
Copy link
Contributor

@kdeenanauth Do you mean to be able to go to the line where the import statement lies? Or go to the go files which are part of the imported package?

@kdeenanauth
Copy link
Author

When clicking on an import statement line, go to the associated file(s). I realize there may be some disambiguation problems though :\

@ramya-rao-a
Copy link
Contributor

Yup, when there are multiple files associated with a package, where would the click go

@kdeenanauth
Copy link
Author

I'm not sure ¯_(ツ)_/¯

Ideally showing a popup so you can click the file you want. But I've heard it's not possible for extensions to implement custom menus. You might just be limited to going to the first file.

@ramya-rao-a
Copy link
Contributor

Browse Packages in Sublime does something similar.
We can use the quickpick control to show the list of files in the selected package.

@jackie-qiu
Copy link

@ramya-rao-a When will this PR be implemented?

@ramya-rao-a
Copy link
Contributor

@jackie-qiu As far as I know, there is no PR open for this.

Do you mean to ask when will this feature be implemented?

@jackie-qiu
Copy link

@ramya-rao-a Yes, when will this feature be implemented?

@ramya-rao-a
Copy link
Contributor

Definitely in June

@jackie-qiu
Copy link

Has this feature been implemented?

@ramya-rao-a
Copy link
Contributor

Hey @jackie-qiu, not yet. I'll try to get it into the next update

@ramya-rao-a
Copy link
Contributor

Re-opening to do the below

The Browse Packages feature relies on the running of go list all when extension gets activated (when you open a VS Code window).
go list all is a little slow, but much more slower on slower machines.

  • Will add a message saying "Still collecting all packages, try after some time"
  • Will also cache the result, so that the second time you open VS Code, you will have something to browse, while in the background go list all is run again and cache is updated.

@ramya-rao-a ramya-rao-a reopened this Jul 21, 2017
@ramya-rao-a
Copy link
Contributor

This feature is now out in the latest update (0.6.63) to the Go extension

  • If cursor is on an import statement, then files from the imported package will be shown in the quick pick control
  • Else, all packages are shown in the quick pick control. Select any and corresponding Go files will be shown next.
  • Selecting any of the Go files, will open the file in a new editor.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants