Installation¶
VS Code Marketplace¶
Search for Go Struct Analyzer in the Extensions panel (Ctrl+Shift+X / Cmd+Shift+X), or install directly:
Open VSX (VSCodium / Eclipse Theia / Gitpod)¶
Search for Go Struct Analyzer in your editor's Extensions panel, or download from:
From Source¶
Prerequisites: Go 1.21+ and Node.js 22+.
This compiles the Go LSP server (gsa-lsp) and the TypeScript extension.
Press F5 in VS Code to open a new Extension Development Host window with the extension loaded.
Build and Install Locally¶
# Install packaging tool (once)
npm install -g @vscode/vsce
# Compile and package
make build
vsce package
This generates a go-struct-analyzer-<version>.vsix file in the project root.
Install the VSIX in VS Code¶
Option A — Command line:
Option B — VS Code UI:
- Open the Extensions panel (
Ctrl+Shift+X/Cmd+Shift+X) - Click the
···menu (top-right of the panel) - Select Install from VSIX...
- Pick the generated
.vsixfile
Reload VS Code after installation (Ctrl+Shift+P → "Developer: Reload Window").
Quick Install (Standalone Binary)¶
Install the latest release of gsa-lsp with one line:
Install a specific version:
The script detects your OS/architecture, downloads the matching binary from GitHub Releases,
verifies its SHA-256 checksum against the release's checksums.txt, and installs it to
$(go env GOPATH)/bin (or /usr/local/bin if that is writable).
To target a custom directory, use -d:
Zed Editor¶
gsa-lsp can also be used in Zed via a dev extension. See Zed installation guide.
Standalone CLI¶
The extension ships gsa-lsp — a Go binary for struct analysis outside VS Code: