Skip to content

r3inbowari/go-mod-explorer

Repository files navigation

Go Mod Explorer

Market Release Market Market

This extension adds a pretty Go Module Explorer for Visual Studio Code, mainly including:

  • External Dependency Viewer
  • Automatic Code Reveal
  • Go Workspace Support

it looks like

image

Symbols

Icon Description
image Module Group
image Invalid Module Group
image Direct Module
image Indirect Module
image Replaced Module
image Workspace Module

Shortcuts

Description Keybinding
Focus the Go Mod Explorer.(package name search) Ctrl(⌘) + Shift + '
Blur and back to the previous focus. Ctrl(⌘) + Shift + '
Reveal the current activate in the Editor. Ctrl(⌘) + Shift + /
Quick Collapse Go Mod Explorer. Ctrl(⌘) + Shift + .

Settings

Name Type Default Description
go.goroot String undefined Custom installation directory.
gomod.autoReveal Boolean true Enable auto reveal.
gomod.focusMode Boolean true Focus when revealing.

Others

Reveal the specified file in the Editor with your Mouse (Ctrl(⌘) + Shift + /).

How to reveal with your mouse

Q&A


Q: Why is there nothing in Go Mod Explorer?
A: Make sure you have installed the Go Binary, and set the system environment or "go.goroot".
A: Note that go.goroot has higher priority than system environment in order to be consistent with the official extension.

Q: Why Go Mod Explorer not showing in Visual Studio Code?
A: This extension depends on the official extension, please install the "vscode-go" at first.
A: "gopls" is also needed, You can download it by "vscode-go". For more details, please refer to the tutorial of "vscode-go".

Q: How to navigate(reveal) to the external code?
A: Make sure you have installed the official extension "vscode-go".
A: Make sure "gomod.autoReveal" is true.

Q: Why sometimes reveal doesn't work?
A: Limited by the Visual Studio Code API, at most three levels of recursion are allowed when revealing.

Q: How to avoid focusing the Go Mod Explorer when revealing?
A: Go to the Settings of Visual Studio Code and set gomod.focusMode to false.

Credits

License

This software is released under the MIT license.

Contributing

See the Quickstart Guide for more information.
If you have problems, you can ask or find on Issue Tracker.
I appreciate if you could report an issue or pr. (๑•̀ㅂ•́)و✧ Enjoy!