tinygo-zed configures Zed's native Go language server and project tasks for a
TinyGo target. TinyGo must be available on PATH.
It reads the selected target's metadata from TinyGo and configures gopls with
the target-specific Go root, platform, and build tags. Hover documentation,
completion, navigation, and diagnostics then understand TinyGo packages such as
machine and target-specific names such as machine.LED.
Zed showing hover documentation for machine.LED on a Pico target
Zed's native Go tooling resolving TinyGo's machine package for a Pico target.
go install github.com/oxplot/tinygo-zed@latest
Run from the project directory:
tinygo-zed init
Choose a target when prompted. For non-interactive use:
tinygo-zed --no-input init --target pico
Open the directory in Zed, click Restricted Mode in the title bar, and trust the worktree. Zed ignores project settings until the worktree is trusted.
The command creates .zed/tinygo.json, .zed/settings.json, and
.zed/tasks.json. It also creates a minimal go.mod and main.go when they do
not exist.
tinygo-zed target [TARGET] Change the target; prompts when omitted
tinygo-zed port [PORT|auto] Change or clear the flash port
tinygo-zed sync Refresh settings after upgrading TinyGo
The generated Zed tasks provide TinyGo build, test, size, allocation, and flash commands when supported by the selected target.
Zed task picker showing the generated TinyGo tasks for a Pico target
Target-aware TinyGo tasks in Zed's task picker.
See TinyGo in Zed for the walkthrough.