← All Tools

A small VS Code extension that wires up your Go 1.24+ tool directives so the Go extension and your tasks use the tools pinned in your go.mod — without a global install.

Status: stop-gap. This exists to bridge the gap until the official Go extension supports go tool natively (golang/vscode-go#3799). When that lands, run Clean Generated Integration and uninstall — nothing is locked in.

Why Go Tools Init?

Go 1.24 lets you track developer tools right in go.mod with tool directives, and run them with go tool <name>:

tool (
    github.com/golangci/golangci-lint/cmd/golangci-lint
    golang.org/x/tools/cmd/goimports
)

That pins your linters and formatters per-module, no global install required. But the Go extension doesn't yet know how to reach those tools. This extension scaffolds the glue — the shims, settings, and tasks — so the Go extension and your VS Code tasks pick them up automatically.

Monorepo aware

Globs every go.mod in the workspace (skipping vendor/ and testdata/), parses each module's tool directives independently, and offers a multi-select picker when several modules need configuring.

Preview before writing

Once you confirm and choose modules, a modal lists every shim, setting, and task that will be created or changed. Nothing is written until you click Apply.

Idempotent & reversible

Safe to re-run when you add tools — it only adds what's missing and refreshes the shims. Clean Generated Integration removes only what the extension created, leaving your own settings and tasks untouched.

Merges, never clobbers

Existing settings.json and tasks.json entries are merged, not overwritten. JSON is read tolerantly — comments and trailing commas are accepted.

What it generates

For each unique tool name found across your modules, the extension creates:

Using it

  1. Open your workspace — a single Go module, or a monorepo with many go.mod files.
  2. When tool directives are found, accept the prompt to set up the integration — or run Init Go Project from the Command Palette (goToolsInit.init) at any time.
  3. Review the preview, click Apply, and accept the Workspace Trust prompt so the Go extension reads your go.alternateTools.

To undo everything, run Clean Generated Integration (goToolsInit.clean). It previews and removes only the .tools/ shims, the go.alternateTools entries, the go.lintTool value, and the go tool tasks it added.

Requirements & limitations

Go 1.24+

Needs tool directives (Go 1.24) and the official Go extension (golang.go).

macOS / Linux

The integration uses bash shims — including Windows via WSL or Dev Containers, where the workspace is Linux. Native Windows is not supported yet.

Trusted workspace

The Go extension only honours go.alternateTools in a trusted workspace — accept VS Code's Workspace Trust prompt.

Install

Install from the Visual Studio Marketplace, or search for Go Tools Init in the Extensions view inside VS Code:

Free and MIT-licensed.

Learn More

For full documentation and source, see the GitHub repository.