-
Notifications
You must be signed in to change notification settings - Fork 0
Editor Support
letsgo lsp [--restricted]
letsgo fmt [file|-]
Everything an editor knows about letsgo comes from the letsgo binary on the machine. There is no second copy of the directive table, the hook list or the feature catalogue living in an extension, because two copies of a closed set become two different closed sets on the first release that adds to one of them.
letsgo lsp speaks stdio JSON-RPC and serves letsgo.mod, the global
config.mod and .letsgo/*.mod:
| Request | What it gives |
|---|---|
publishDiagnostics |
parse and decode errors, on every change |
formatting |
byte-for-byte what letsgo fmt produces |
completion |
directive names, build targets, hooks, feature names, first-party plugins |
hover |
a directive's documentation |
documentSymbol |
an outline |
codeAction |
update a plugin pin |
Checks that point at a line — a budget naming a target that is not built, say —
carry a file:line:col position, so they appear as squiggles on save rather than
as text in a terminal.
It is a plain LSP server with no client-specific extensions: Neovim's built-in client gets diagnostics and completion from the same binary VS Code does.
--restricted parses, decodes, formats and completes, and does nothing else: no
plan, no plugin lookup, no subprocess. It is what an editor starts for a
workspace you have opened but not trusted — a repository you are only reading
should not be able to execute its own pinned plugins through your editor.
letsgo fmt # format letsgo.mod in place
letsgo fmt path/to.mod # a named file
letsgo fmt - # stdin to stdout- is what makes an editor's format-on-save work without a temporary file, and
it exits 1 on a parse error rather than emitting something it guessed at.
--json is available on plan, verify, tag, features and plugin list.
Every one carries schema, and removing a field bumps it:
{"schema": 1, "...": "..."}That is the contract a tool can build on. The rendered text output is for people and is not a stable interface.
letsgo-vscode is a thin
client over the binary. It needs letsgo on PATH, or pointed at with
letsgo.path.
A letsgo view in the Explorer sidebar, one entry per module — a directory
with a letsgo.mod — built from plan --json: resolved values, gates with
their status, the artifacts a release would produce, features that depart from
their defaults, and plugin pins. The status bar shows the current module's
version and gate-failure count.
Update pin — a lightbulb on a plugin <hook> <command> <version> sha256:...
line installs that plugin's latest release into the store and
rewrites the pin.
Tag next version — asks letsgo for a proposal (tag --json), shows
major/minor/patch with the proposed level first and its reason, tags on your
pick, then offers to push. Pushing the tag is what starts the release in CI; the
extension never publishes one itself.
Manifests — a letsgo.json gets a Verify lens, and "Reopen Editor With... →
letsgo manifest" shows its artifacts, gates, features and plugins with a Verify
button.
Commands, all running the binary on your machine:
| Command | Runs |
|---|---|
| Plan with analysis | letsgo plan --json --analyse |
| Build snapshot | letsgo build --snapshot |
| Rehearse release | letsgo release --snapshot |
| Diff releases | letsgo diff <from> [to] |
| Install pinned plugins | letsgo plugin install |
| Update letsgo |
letsgo update, after showing what is available and asking |
Tasks — a letsgo task type with a $letsgo problem matcher for
letsgo.mod:L:C: message lines:
{ "type": "letsgo", "command": "plan", "args": ["--analyse"], "problemMatcher": "$letsgo" }It runs plan, build, verify, diff, doctor, features, audit and
plugin, plus release only with --snapshot.
The extension never runs plan, tasks or plugins, and starts the server with
--restricted. Update pin and Tag next version are not offered.
The extension checks letsgo version and switches off what a too-old binary
lacks, naming them once rather than erroring repeatedly: the panel, Tag and
Verify need 0.29.0, Install pinned plugins 0.29.0, language features 0.30.0, and
Update pin 0.31.0. A dev build is assumed current.
The extension publishes no releases and stores no tokens.
Start here
Releasing
Checking
Extending
Running it
About