tinygo-zed

command module
v0.0.0-...-40adce6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0

README

tinygo-zed

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.

Install

go install github.com/oxplot/tinygo-zed@latest

Configure a project

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.

Commands

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.

Documentation

Overview

Command tinygo-zed derives Zed's native gopls settings and project tasks from TinyGo's metadata for one target per repository.

Directories

Path Synopsis
internal
picker
Package picker provides a line-oriented, searchable terminal selector.
Package picker provides a line-oriented, searchable terminal selector.
project
Package project owns the on-disk contract generated for a TinyGo Zed project.
Package project owns the on-disk contract generated for a TinyGo Zed project.
tinygo
Package tinygo reads target and port metadata from the TinyGo command-line interface.
Package tinygo reads target and port metadata from the TinyGo command-line interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL