Skip to content

Go ​

Catalog v8.

Installs the Go toolchain, the gopls language server, the Delve debugger, and GCC for cgo.

Select ​

toml
[toolchains]
go = "1.27"

Choose the line in the [toolchains] table of limanix.toml and apply the change. The client guide describes the [toolchains] table.

Versions ​

The value selects one line:

ValueGogoplsDelveNotes
1.271.27.xBaseBaseRecommended
1.261.26.xBaseBase
1.251.25.xBaseBaseEnd of life

Lines marked .x and their gopls and Delve come from the base Nixpkgs revision and receive its updates with each catalog release.

Support status follows the Go release policy. Selecting an end-of-life line prints a warning when the VM is built. GCC comes from the base Nixpkgs revision for every line.

Use ​

Inside the VM, run from a directory that contains go.mod:

console
go build ./...
go test ./...

GCC enables cgo and the race detector:

console
go test -race ./...

Packages that link to C libraries also need those libraries; see Handle native dependencies. The Delve debugger runs as dlv.

Toolchain downloads ​

When a project's go.mod or go.work requires a newer Go version, Go can download and run that toolchain instead, including when you run a versioned command. To use only the installed toolchain, set GOTOOLCHAIN in the [env] table of limanix.toml:

toml
[env]
GOTOOLCHAIN = "local"

The client guide describes the [env] table. With this setting, a project that requires a newer Go version fails to build instead of downloading a toolchain. See Go toolchains for the selection rules.

Editor support ​

The module installs gopls for editors that support the Language Server Protocol. See Editor integration and the gopls editor setup.

Configuration and integration
BoundaryContract
Public capabilitylmx.capabilities.languageSupport.tools.gopls; Go, gomod and gosum parsers
Personal stateGo module and build caches; project go.mod and go.work
IntegrationDeclares the selected server without enabling an editor; AstroNvim consumes it
ServicesNo daemon

Corner cases ​

CaseBehavior or next step
Another Go version runsInspect PATH and GOTOOLCHAIN; project directives can download a newer toolchain
cgo library is missingGCC is included; add the project's required native headers and libraries separately

Free and open source under the Apache License 2.0.