Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Go Usage FinderNew to Visual Studio Code? Get it now.
Go Usage Finder

Go Usage Finder

chenyihui

|
90 installs
| (0) | Free
Find all references (read/write) for Go symbols across project, GOROOT, and external libraries
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Go Usage Finder

Find read/write references for Go symbols (fields, functions, variables) in VS Code.

Current documented version: 0.1.1

Features

  • 🔍 Multi-source reference search:
    • Workspace/project
    • GOROOT (Go standard library)
    • External modules
  • ⚡ Workspace-only fast path:
    • If the selected symbol is inside the current workspace, search is limited to workspace references only.
    • GOROOT/external scanning is skipped in this case for better speed.
  • 📖 Read/write classification (heuristic)
  • 🎯 Bottom panel tree view with grouped categories and file hierarchy
  • 👁️ Peek references command for quick navigation
  • 🧭 Click-to-preview side-by-side navigation

Requirements

  • VS Code >= 1.85.0
  • Go installed and available in PATH
  • Go extension for VS Code (recommended)
  • gopls installed (recommended for full cross-package coverage)

Install gopls if needed:

go install golang.org/x/tools/gopls@latest

Installation

Marketplace

  1. Open VS Code
  2. Open Extensions (Cmd+Shift+X / Ctrl+Shift+X)
  3. Search for Go Usage Finder
  4. Click Install

From source

  1. Clone this repository
  2. Open it in VS Code
  3. Run:
npm install
npm run compile
  1. Press F5 to launch the extension development host

Usage

Find references (tree view)

  1. Open a .go file
  2. Put cursor on a symbol
  3. Run Go: Find All References (Read/Write) from right-click menu or command palette
  4. View results in Go References panel

Find references (peek view)

  1. Put cursor on a symbol
  2. Run Show References in Peek View
  3. Navigate with arrows, Enter to jump, Esc to close

Result groups

  • 📖 Read References
  • ✏️ Write References
  • 📁 Workspace
  • 🔧 GOROOT
  • 📦 External Libraries

Each reference item displays line number and snippet. Clicking an item opens side preview.

How search works

  1. VS Code reference provider for primary results
  2. Optional gopls references fallback/enrichment
  3. Scope detection (workspace/goroot/external)
  4. Read/write inference from line context
  5. Performance optimizations:
    • Go environment caching
    • Document open caching
    • Batched concurrent reference processing
    • Workspace-only short-circuit mode

Known limitations

  • Read/write classification is heuristic and may miss edge cases
  • Very large repositories can still be slow
  • External library coverage depends on gopls availability

Development

npm install
npm run compile
npm run lint

Changelog

0.1.1

  • Added workspace-only search optimization for symbols inside current project
  • Reduced repeated I/O with Go env and document caching
  • Improved large-result processing with batched concurrency
  • Improved documentation for latest behavior

0.1.0

  • Initial release
  • Reference search across workspace, GOROOT and external modules
  • Read/write distinction
  • Bottom panel tree view and peek navigation
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft