Edit and run Strict (.strict) files in Visual Studio Code.
- Syntax highlighting for
.strictfiles - Language Server integration (diagnostics, autocomplete, document highlight, quick fixes)
- Readable diagnostics — error codes are humanized, exception messages and extra details are shown (not just the type name)
- Quick fixes — lightbulb / Alt+Enter (or Ctrl+.) for common issues such as empty lines and bad whitespace
- SCrunch — runs next to normal analytics. Parse errors, violations, and failing tests are all blockers. Tests run when a file is opened or saved; a fresh sibling
.strictbinarymeans last run parsed, built, and passed — folder load reuses that cache until you edit. - Inline test dots — green/red gutter marks on every covered line; hover lists the tests that called that line. Click a test to see just that result (no rerun). Duration is in microseconds.
- Testing view — type → methods that have tests. Green if all good, red if anything needs fixing. SCrunch: Show in Testing focuses that tree.
- Inline variable values after evaluation notifications
- Strict: Run File — runs the current file through the Strict CLI in a terminal
- Strict: Run Method... — asks for a method/expression and executes it through the language server
- Strict: Restart Language Server — reloads the LSP after runtime rebuilds
Built Strict runtime next to this extension (recommended layout):
strict-lang/
Strict/ # runtime + language server
strict-vscode-client/ # this extension
Build the language server with the strict CLI:
strict LanguageServerThe extension auto-detects:
../Strict/LanguageServer/LanguageServer.strictbinary../Strict/strict.strictbinary
You can override paths in settings if your layout differs.
| Setting | Meaning |
|---|---|
strict.languageServer.path |
Path to Strict.LanguageServer.dll, exe, or project. Empty = auto-detect |
strict.cli.path |
Path to Strict.dll or exe for Run File. Empty = auto-detect |
strict.dotnetPath |
dotnet host used to launch DLL builds (default dotnet), older builds of Strict, should not longer be required |
| Command | Default keybinding | Description |
|---|---|---|
Strict: Run File |
Ctrl+Shift+R / Cmd+Shift+R |
Save and run current .strict file via CLI |
Strict: Run Method... |
— | Prompt for expression and run through LSP |
Strict: Restart Language Server |
— | Stop/start LSP process |
SCrunch: Show in Testing |
— | Focus the Testing view (SCrunch tree) |
SCrunch: Show Tests for Line |
— | List tests that covered the current line and show that result |
Also available from the editor title play icon and the editor context menu on .strict files.
npm install
npm run compile
npm run test:unitPress F5 in VS Code (Run Extension) to launch an Extension Development Host.
Useful scripts:
npm run watch— compile on changenpm run lint— ESLintnpm run package— create a.vsix(requires@vscode/vsce)
Strict.LanguageServer listens on the Windows named pipe Strict.LanguageServer. On activation the extension:
- Resolves the server binary (setting → sibling repo build → PATH)
- Starts the process
- Connects over the named pipe with retries
- Speaks standard LSP plus Strict notifications:
testRunnerNotification— gutter + SCrunch Test Explorer (expression, method, duration, stack)valueEvaluationNotification— inline values
Logs appear in the Strict output channel.
The language server also speaks MCP over stdio so an LLM can verify .strict changes without VS Code:
dotnet ../Strict/Strict.LanguageServer/bin/Debug/net10.0/Strict.LanguageServer.dll --mcpThis repo ships .mcp.json and .grok/config.toml that start that process. Tools:
| Tool | What it does |
|---|---|
check |
Parse + diagnostics + SCrunch tests for a file or folder. Fresh .strictbinary counts as pass unless force is true. ok: true means nothing to fix. |
status |
Cache freshness only (no re-run) |
After editing Strict files, call scrunch__check with the file or folder path. If ok is false, fix the problems list (same class of error as in the editor: parse, violation, or failing test).
- Named-pipe transport matches the current language server (Windows-focused)
- Semantic features depend on a working Strict language server build
- Run Method uses the LSP command
strict-vscode-client.runimplemented server-side
- Auto-start Strict language server from sibling repo / settings
- Run File terminal integration and Run Method prompt
- Local gutter icons for test results
- Settings, menus, keybinding, and real README