Editor support
tflw lsp is a real Language Server Protocol
implementation — diagnostics, hover, go-to-definition, autocomplete, rename, signature help, and
rich semantic highlighting, all live over debounced in-process reparsing. It speaks standard LSP
over stdio, so any LSP-capable editor can use it; VS Code is the first-class client shipped today,
via the tflw extension (packages/vscode in the repo).
Everything below works for both .tflw test files and tflw.config — one server, one grammar,
two dialects. Every demo on this page runs the exact same resolver code the language server
does, client-side — not a screenshot or a recording. The one difference is that a browser has no
project on disk: the two checks that need a resolved tflw.config — unknown api <service> and
unknown session names — can't run here, so they're the only errors you'll see in your editor but
not in these demos.
Install
Section titled “Install”Until 1.0 the extension is a .vsix attached to a
GitHub release — download it and install it with
Extensions: Install from VSIX…, or:
code --install-extension tflw-vscode-0.1.0.vsixOn 1.0 day it is listed on the Visual Studio Marketplace and Open VSX, and this section becomes one
ext install line. Working in the editor is the day-to-day guide.
Reload VS Code, open a .tflw file or a tflw.config, and the extension activates automatically.
Syntax highlighting + semantic coloring
Section titled “Syntax highlighting + semantic coloring”Coloring comes from two layers. A static TextMate grammar handles tflw's fixed vocabulary
(keywords, strings, api methods, matcher words). On top of that, the language server also serves
textDocument/semanticTokens/full — it colors things the grammar structurally can't (variable/
parameter names, object-literal field keys — arbitrary user-chosen text, not fixed vocabulary) and
fills in matcher/operator words and numeric literals using your editor's own semantic color
palette, independent of whichever theme is active.
Below is the real classifier's output on a representative snippet, colored by category (the palette here is illustrative, not a specific VS Code theme — how rich this looks in your own editor depends on how much semantic-token coverage your theme defines; VS Code's own bundled default theme is sparser here than a fuller theme like One Dark Pro, but the extension never overrides your theme's colors, it only supplies the tokens for your theme to color):
Diagnostics + hover
Section titled “Diagnostics + hover”Diagnostics update live as you type — the same teaching-quality errors the CLI prints (source line
- caret + "did you mean", stable
TF0xxcodes; see Getting started and CI, reporting & safety), surfaced as inline squiggles. Hover over one for the full message and hint without leaving the line:
Autocomplete
Section titled “Autocomplete”Context-aware completion for keywords, matcher/generator words, and in-scope variable, parameter, and action names — narrowed to what's actually valid at the cursor:
In tflw.config too, which has its own vocabulary: the top-level directives, the config keys legal
in the block you're in (a defaults block is never offered an env-only key, or the other way
round), and the probe … sub-clauses under an authorized target.
Go to definition
Section titled “Go to definition”Jump from a variable, parameter, or action reference straight to where it's defined — across
imported files too:
Rename
Section titled “Rename”Rename a variable, parameter, or action everywhere it's used — including inside string and path
interpolation holes ("{name}", /orders/{orderId}) — in one edit:
Signature help
Section titled “Signature help”A parameter hint while calling an action, so you don't have to jump to its definition to remember its shape:
Run from the editor
Section titled “Run from the editor”Every test is in the Test Explorer: run a file, one test, or the previous run's failures, and
each verdict shows beside the test — a failure at the step that failed. The ▶ Run test and
▶ Run file lenses above every test "..." line run through the same explorer, with the same
tflw binary the CLI reference covers.
Outline, references and code actions
Section titled “Outline, references and code actions”The Outline view lists a file's tests, actions, elements and hooks; Find All References follows
an action, session or element into every file that uses it; every block folds. Each reuse hint
tflw check prints is a code action — Extract into action or Extract into element — that writes
what tflw refactor apply writes, and a did you mean diagnostic offers its fix.
Settings
Section titled “Settings”tflw.env— whichtflw.configenvironment diagnostics resolve services/sessions against (the same precedence slot astflw run --env/TFLW_ENV). Leave unset to use the config's default or sole environment.