Forth Editor AssistantForth Editor Assistant adds live, symbolic stack analysis to Visual Studio Code. It shows the stack before and after each source line, checks word and control-flow effects, offers type-compatible completions, and formats Forth without executing your program. The extension is self-contained: it uses VS Code's bundled Node.js runtime and does not require a separate Forth system, Python, Java, Node.js installation, network service, or Marketplace connection at run time. InstallRequirements: desktop VS Code 1.96 or later on Windows, macOS, or Linux. Install Forth Editor Assistant from the VS Code Marketplace, or run:
After installation, run Forth: Open Example from the Command Palette. For an offline installation from a repository checkout, choose Extensions → … →
Install from VSIX… and select
The
On macOS, use For WSL, SSH, or a development container, install the extension in the remote extension host. Browser-only vscode.dev is not supported. Files ending in
What it provides
For example, the editor can display:
Blank means an empty displayed stack, Use Forth: Adjust Stack Column Widths (or click Stacks in the status bar) to set the before and after widths independently. Use Forth: Inspect Stack at Cursor for a keyboard- and screen-reader-friendly view. ProfilesThe default profile is
Select one by clicking the profile name in the status bar or running Forth:
Select Profile. This distribution includes editable reference copies in the
A profile consists of a
Editing this distribution's reference copies does not change the profiles inside the installed VSIX. See Configuration profiles for file formats, examples, and authoring guidance. Useful settingsSearch VS Code Settings for
The extension sets Forth-specific defaults for formatting on save and on type,
selects itself as the default formatter, uses two-space indentation, and disables
the minimap, word-based suggestions, and snippet suggestions. You can override
these in your
Analysis limitsDiagnostics are advisory; a clean Problems view is not proof that a program is correct. Analysis uses declared effects and definitions in the current document, not code from included files or a running Forth dictionary. Unknown words may make dependent effects undetermined. Bundled profile names identify dialect models, not complete standards-conformance
checks. For example, the default profile does not track return-stack contents,
models Local data and privacyAccepted completions update per-profile word-frequency counts in VS Code's extension global storage, shared across workspaces in that extension host. These counts include word names, not source documents, and are not sent to a service. Use Forth: Reset Learned Frequencies to clear learned counts or Forth: Export Learned Frequencies to save them as JSON. Column-width choices are stored per workspace. TroubleshootingIf stack columns are missing, verify that the document language is Forth, that
Profile files are reloaded when they change. If a reload is invalid, the last valid profile remains active for that open document and a warning is shown; formatting is suspended until the error is fixed. Initial profile errors leave analysis pending rather than inventing results. If a project profile is ignored, open the project folder, not just a single file, and select Automatic to clear an explicit profile override. In a remote window, profile paths refer to the remote filesystem. If stack indices are hidden or widths do not match Forth: Open Example intentionally includes an incompatible branch and a caller whose effect is undetermined. Warnings there demonstrate the checker; they do not indicate an installation failure. LicenseCopyright Jaanus Pöial. Forth Editor Assistant is licensed under the Apache License 2.0. The installed package includes the same license. Licenses for bundled third-party components are listed in THIRD_PARTY_NOTICES.md. |