Go
Language server: gopls
go install golang.org/x/tools/gopls@latestOn macOS without Go installed, krait can install gopls via Homebrew:
krait server install go # uses brew if go is not in PATHNote: installing the gopls binary alone is not sufficient — the Go toolchain must also be in PATH at runtime (see Troubleshooting below).
Requirements
Section titled “Requirements”go.modat project root- Go toolchain in PATH (
gocommand available) - gopls binary installed
Zero Config
Section titled “Zero Config”Go projects work out of the box. go.mod is automatically detected as the workspace marker.
cd my-go-projectkrait list symbols internal/server/handler.goSupported Operations
Section titled “Supported Operations”find symbol— resolves functions, types, interfaces, methodshover— Go godoc and type infocheck— Go compiler errorsedit replace— replaces function/type bodiesrename— gopls cross-file renamefind refs— all usages
Receiver Methods
Section titled “Receiver Methods”For methods with receivers (e.g., func (s *Server) Handle(...)), use the dotted form:
krait read symbol Server.Handlekrait find symbol Server.HandlePerformance
Section titled “Performance”gopls is fast even on large projects. find symbol and hover typically respond in 30-60ms on warm daemon.
Troubleshooting
Section titled “Troubleshooting”warn go: gopls is installed but requires go in PATH
Section titled “warn go: gopls is installed but requires go in PATH”gopls is a standalone binary, but it calls the go command internally to load module graphs and type-check packages. Installing the gopls binary alone (e.g. via brew install gopls) is not enough.
Fix: Install the Go toolchain from https://go.dev/dl/, then re-index:
go version # verify Go is availablekrait daemon stopkrait init --forceindexed 0 files, 0 symbols with no warning
Section titled “indexed 0 files, 0 symbols with no warning”gopls is likely not installed.
krait server list # check gopls statuskrait server install go # install gopls (requires go in PATH)krait status shows go (gopls) — pending indefinitely
Section titled “krait status shows go (gopls) — pending indefinitely”gopls is still loading the workspace, or failed to start silently. Restart the daemon:
krait daemon stopkrait status # daemon auto-restarts on next commandFirst krait init is slow
Section titled “First krait init is slow”gopls downloads and caches module dependencies on first use. This is a one-time cost. Large modules (e.g. with many external dependencies) can take 30–60 seconds the first time.