A Visual Studio Code extension that adds CodeLens actions and trusted hover links for fast, low-friction navigation in Go code.
The extension is designed to feel native, stay out of the way, and scale well on large Go projects.
For Go symbols, the extension displays CodeLens actions directly above declarations:
def · type def · impls · type hierarchy · callers · refs
CodeLens behavior:
- Automatically refreshed while typing (with debouncing)
- Powered by
goplsthrough Visual Studio Code document symbol provider - Updated only for the currently active Go editor
When hovering over a Go symbol, the same navigation actions appear as clickable links:
def · type def · impls · type hierarchy · callers · refs
Hover links are trusted and invoke the corresponding built-in Visual Studio Code navigation commands.
- Document symbols are cached per file version
- CodeLens refresh is debounced and configurable
- No background processing for inactive editors
- Go installed: https://go.dev/doc/install
- Go extension for Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=golang.go
goplslanguage server: https://github.com/golang/tools/tree/master/gopls
All settings are available under the codelensGolangNavigate namespace.
| Option | Description | Default |
|---|---|---|
codelensGolangNavigate.enableCodeLensActions |
Enable or disable CodeLens actions | true |
codelensGolangNavigate.enableHoverLinks |
Enable or disable hover navigation links | true |
codelensGolangNavigate.refreshOnTyping |
Refresh CodeLens while typing in the active Go file | true |
codelensGolangNavigate.refreshDebounceMs |
Debounce delay (ms) for refresh-on-typing | 120 |
codelensGolangNavigate.logLevel |
Minimum log level: error, warn, info, debug | info |
Add the following to your Visual Studio Code settings.json:
{
"codelensGolangNavigate.enableCodeLensActions": true,
"codelensGolangNavigate.enableHoverLinks": true,
"codelensGolangNavigate.refreshOnTyping": true,
"codelensGolangNavigate.refreshDebounceMs": 100,
"codelensGolangNavigate.logLevel": "info"
}