Browse Go standard library and module dependencies in the VS Code explorer sidebar, similar to GoLand's External Libraries.
✨ Features
📚 Go Standard Library: Browse all Go standard library packages in a convenient tree view.
📦 Go Module Dependencies: Visualize your project's go.mod dependencies.
📂 File Navigation: Double-click any file in the tree to open it directly in the editor.
🔍 Find in Folder: Right-click any folder in the tree to perform a scoped search (Find in Files).
🖥️ Open in Terminal: Right-click any folder to open it in VS Code's integrated terminal.
📁 Open in Finder/Explorer: Right-click any file or folder to reveal it in your operating system's file manager.
🎯 Reveal in Tree:
Quickly locate the currently active file in the "Go External Libraries" view.
Supports both standard library files and dependency files.
Smart Dependency Jump: If you place your cursor on a dependency line in go.mod and trigger "Reveal in Tree", it will jump to that specific module in the tree view.
📋 Copy Import Path: Right-click a module to copy its import path.
🌐 Open in pkg.go.dev: Right-click a module to view its documentation on pkg.go.dev.
📄 Open go.mod: Right-click a module to open its go.mod file.
🔎 Search Dependencies: Quickly search and filter your dependencies.
⚠️ Show Diagnostics: View diagnostic information about your dependencies.
🚀 Usage
Open a Go Project: Open any folder containing a go.mod file.
Explore: Look for the "Go External Libraries" view in your Explorer sidebar (default) or SCM view.
Context Actions: Right-click on folders/files to access additional tools like Search, Terminal, or Finder.
Navigate: Double-click files to read code.
Locate: While reading code in a dependency file, use the shortcut to find where it is in the tree.
⌨️ Keyboard Shortcuts
Command
Windows / Linux
macOS
Reveal in Tree
Ctrl + Alt + S
Cmd + Alt + S
Reveal in Tree (Alternative)
Alt + S
Alt + S
Search Dependencies
Ctrl + Shift + J
Cmd + Shift + J
Toggle Visibility
Ctrl + Shift + K
Cmd + Shift + K
Note: You can also run the command Go Mod Tree: Reveal in Tree from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
⚙️ Configuration
You can customize the extension behavior in VS Code settings:
goModTree.viewLocation:
left: Show in the Explorer view (default).
right: Show in the Source Control (SCM) view.
⚙️ Requirements
Go must be installed and added to your PATH.
The extension relies on go env GOROOT and go env GOPATH to locate libraries.
📝 Known Issues
Module cache path detection relies on standard go env output.
Some complex replace directives in go.mod might not be fully reflected in the tree structure yet.