Flow Language for VS Code
Local editing support uses the shared flow-lsp server. Explicit check, run and
test commands use the Flow CLI. An installed Flow on PATH needs no additional
settings: the extension selects its sibling language server and the binaries
discover their matching standard library and package catalog.
To select another complete installation, set flow.installationDirectory to
its root (the directory containing bin, std and packages). Explicit
flow.executable, flow.languageServerExecutable and flow.standardLibrary
settings override that selection. The standard-library override names std/v1.
These settings can be set in user settings or a trusted workspace. In a
multi-root workspace, select the installation in the .code-workspace settings:
one language server serves the window. Reload the extension after changing it.
The Flow Language Server output channel reports the selected binaries. Explicit
actions run the CLI's read-only installation diagnosis before dispatch and compare
its identity with the initialized language server. A different version, installed
revision or changed server path requires selecting one installation and reloading
the window. Source builds without a recorded revision can be compared only by
version; they do not establish exact source identity.
The extension requires Workspace Trust before activating or launching configured
executables. Opening a trusted Flow file starts the language server; check, run
and test remain explicit actions. flow.runsDirectory and flow.runArguments
are user or remote settings, rather than workspace overrides.
The extension provides compiler diagnostics, hover, navigation, completion,
references, rename, signature help, inlay hints, semantic highlighting and formatting.
Inferred binding types and call parameter names appear inline when the editor's
Editor: Inlay Hints setting is enabled.
Use Flow: Check Saved File, Flow: Run Saved File or Flow: Test Saved
File for explicit CLI actions. Run arguments are JSON text. Configure
flow.runArguments for explicit Tool bindings or pauses. For a native Tool,
follow the editor run setup,
including the project profile's implementation consent. Test discovery is
available in VS Code's Testing view. Explicit actions display the CLI's human
output; the Testing view consumes structured results. The Output panel uses
plain Unicode diagnostic layout rather than terminal color escapes.
Use Flow: Inspect Recorded Run, Flow: Show Recorded Facts or Flow:
Replay Recorded Run to choose a recorded workspace run. The CLI selects its global history root by default;
flow.runsDirectory explicitly selects another root. Each editor invocation receives an accepted-Start routing receipt before execution
continues, so interrupted runs can be recovered without guessing which concurrent
run belongs to it. Histories remain directly discoverable in the global root. The most recent 100
routing receipts persist across extension restarts. They retain paths, run IDs
and a hash of the saved entry bytes before invocation; they contain no run values.
Show Recorded Facts and Replay Recorded Run open readable CLI reports in editor
tabs; the Flow Commands output panel reports source identity. Inspect Recorded Run retains its JSON inspection
view. Values retain the CLI's exact numeric digits.
These actions use the captured run directory and recorded source bundle, including
after workspace sources or settings change or the entry file is deleted. The
command output identifies current saved-entry differences and unsaved entry edits.
The adapter tests use target/debug/flow by default. Build it with
cargo build -p flow-cli, or set FLOW_CLI explicitly to the binary being
tested. The real editor packaging harness selects its separate build explicitly.
Build a local VSIX with npm run package in this directory. The shared Flow
packager installs dependencies in a private project copy and prints the actual
VSIX path in its JSON receipt. Use VS Code's Install from VSIX action with
that artifact. For installed-host qualification, set FLOW_TOOLING_PACKAGE_RECEIPT
to the generated editor-package.json, or set FLOW_TOOLING_TEST_VSIX to an
explicit VSIX path, before npm run test:installed. Select the matching installation with flow.installationDirectory; the package
includes the language client and syntax support.
These are non-normative usage instructions. Flow's specifications define the
language and runtime behavior.