Exact Contract Language Support

Official Visual Studio Code & Antigravity IDE extension providing syntax highlighting, intelligent indentation, snippets, and language detection for Expo Exact Contract (.contract and .test.contract) files.
Preview
1. Reactive Component Syntax Highlighting (app.contract)
Rich syntax highlighting for shapes, reactive components, state, actions, and declarative views:

2. Behavioral Test Suite (app.test.contract)
First-class DSL highlighting for contract tests, assertions, and user actions:

3. Automatic File Recognition & Icon Theme
Seamless detection of .contract and .test.contract files with dedicated icon theme support:

What is Exact Contract?
Expo Exact introduces a clean, reactive contract architecture:
- UI & Views are defined in
.contract
- Business & Data Logic in TypeScript (
.ts)
- Behavioral Tests in
.test.contract
This extension brings a first-class editing experience for Contract files across all modern editors.
Features
Accurate Syntax Highlighting
Full grammar coverage for the Contract DSL:
- Declarations:
shape, component, action, test
- Reactivity & State:
state, mutation, resource, derive, view
- Control Flow:
if, else, for, in, send, refreshes, as
- Test DSL:
expect, type, tap, key, tree, missing, has
- Built-in UI Tags:
heading, text, field, button, row, column, checkbox, image, stack, list, etc.
- Attributes:
testId, value, input, placeholder, press, checked, change, key, etc.
- Template Literals: Nested expression highlighting inside
`${var} items`.
- Comments: Single-line (
// and #) and multi-line (/* ... */).
Smart Indentation & Bracket Matching
- Indentation rules tailored for indentation-based Contract blocks.
- Auto-closing pairs for brackets, quotes, and backtick template strings.
Built-in Snippets
Type any prefix and press Tab or Enter:
| Prefix | Description |
|---|---|
| shape | Scaffold a new data shape definition |
| component | Create a full reactive component with state and view |
| action | Declare a mutation action |
| view | Add a view block |
| test | Scaffold a Contract behavior test case |
| for | Iterate over items with row layout |
| button | Insert a button with label and press handler |
Installation
From VS Code Marketplace
Search for Exact Contract Language Support in the VS Code Extensions tab (Ctrl+Shift+X / Cmd+Shift+X) and click Install.
Or install from CLI:
code --install-extension SujeetThakur.exact-contract-language
License
MIT © Sujeet Thakur
| |