Editor support

The ForgeDB VS Code extension — syntax highlighting plus a compiler-backed language server (diagnostics, completion, hover, goto-definition, rename) for .forge schemas, and how to install it in VS Code, Cursor, VSCodium, and other editors.

.forge schemas get first-class editor support from the ForgeDB Schema Language extension. It is published on both the VS Code Marketplace and Open VSX, so it installs in VS Code and in the Open VSX editors (Cursor, VSCodium, Windsurf, code-server, Gitpod).

The extension provides two things: TextMate syntax highlighting that ships in the package itself, and a set of language features backed by the same compiler that powers the CLI — the diagnostics you see while typing are the exact errors forgedb validate would report.

The language features need the forgedb CLI installed

Syntax highlighting works on its own. Diagnostics, completion, hover, goto-definition, and rename are served by the ForgeDB language server, which ships with the CLI — the extension launches it via forgedb lsp. If forgedb isn't on your PATH, you get highlighting but no live diagnostics. Install the CLI first, or point the extension at it with forgedb.path.

Install#

VS Code#

Search "ForgeDB" in the Extensions view, or install from the Marketplace listing. From a terminal:

code --install-extension forgedb.forgedb

Cursor, VSCodium, Windsurf, code-server (Open VSX)#

These editors resolve extensions from Open VSX rather than the VS Code Marketplace. Search "ForgeDB" in their Extensions view — the same forgedb.forgedb package is published there. The .vsix is also attached to each GitHub Release if you'd rather install from a file (code --install-extension forgedb.vsix).

What you get#

The extension activates on any .forge file (onLanguage:forge).

FeatureSourceNotes
Syntax highlightingBundled TextMate grammarWorks without the CLI.
DiagnosticsLanguage serverThe same errors forgedb validate emits, live as you type. Resilient parse: a partial AST plus every compiler diagnostic, so one syntax error doesn't blank the rest.
CompletionLanguage serverContext-aware suggestions for types, modifiers, and directives.
HoverLanguage serverInline info for the symbol under the cursor.
Goto-definitionLanguage serverJump from a bare type reference to its model / struct / enum declaration.
RenameLanguage serverRename a model/struct/enum and its references together.
SnippetsBundledScaffolds for common schema shapes.

Commands#

Run these from the Command Palette under the ForgeDB category. They shell out to the CLI, so they need forgedb resolvable (see settings below).

CommandDoes
ForgeDB: Generate CodeRuns forgedb generate for the current project.
ForgeDB: Validate SchemaRuns forgedb validate and surfaces the result.
ForgeDB: Start Dev ModeRuns forgedb dev — watch the schema and regenerate on change.
ForgeDB: Create ModelInserts a new model scaffold.
ForgeDB: Restart Language ServerRestarts the forgedb lsp process (use after upgrading the CLI).
ForgeDB: Show OutputOpens the extension's output channel.

Settings#

SettingDefaultMeaning
forgedb.path"" (resolve from PATH)Path to the forgedb CLI. The extension launches the language server via this CLI's forgedb lsp subcommand. Set it if forgedb lives somewhere off your PATH.
forgedb.lspServerPath"" (resolve from the CLI)Absolute path to the forgedb-lsp server binary. Overrides forgedb.path — point it at a specific build, e.g. a local target/debug/forgedb-lsp.
forgedb.autoGenerateOnSavefalseRun forgedb generate automatically whenever a .forge file changes.

The server binary ships with every install channel

Every install channel that carries the CLI also carries forgedb-lsp beside it — the shell installer, Homebrew, npm, PyPI, Docker, and the direct archives all include both binaries. cargo install forgedb --features lsp builds it too. So on a normal install you don't set forgedb.lspServerPath at all; the extension finds the server through the CLI.

Next#

New to the schema language itself? Start with the schema overview or the cheatsheet. The underlying command the extension drives is documented at forgedb lsp.

Search documentation

Find pages across the ForgeDB docs