|
1 | | -# OrgScript VS Code scaffold |
| 1 | +# OrgScript VS Code |
2 | 2 |
|
3 | | -This folder contains a minimal VS Code language contribution for `.orgs` files. |
| 3 | +This folder contains a locally testable VS Code extension for `.orgs` files. |
4 | 4 |
|
5 | 5 | ## What is included |
6 | 6 |
|
7 | | -- `package.json` registers the `OrgScript` language and the `.orgs` extension |
8 | | -- `syntaxes/orgscript.tmLanguage.json` provides TextMate syntax highlighting |
9 | | -- `language-configuration.json` adds lightweight editor behavior for quotes and brackets |
| 7 | +- `package.json` registers the `OrgScript` language with language id `orgscript` |
| 8 | +- `syntaxes/orgscript.tmLanguage.json` provides TextMate-based syntax highlighting |
| 9 | +- `language-configuration.json` adds lightweight editor behavior for double-quoted strings |
10 | 10 |
|
11 | 11 | ## What is highlighted |
12 | 12 |
|
13 | 13 | - top-level blocks such as `process`, `stateflow`, `rule`, `role`, `policy`, `metric`, and `event` |
14 | | -- core keywords such as `when`, `if`, `then`, `else`, `assign`, `transition`, `notify`, `create`, `update`, `require`, and `stop` |
15 | | -- strings, numbers, and operators |
16 | | - |
17 | | -OrgScript does not define a comment syntax in the language spec yet, so this scaffold intentionally does not add comment highlighting. |
18 | | - |
19 | | -## Use locally |
20 | | - |
21 | | -1. Open `editors/vscode/` in VS Code. |
22 | | -2. Open a `.orgs` file from the repo, or create a new one in that folder. |
23 | | -3. If needed, select `OrgScript` from the language mode picker in the bottom-right corner. |
24 | | - |
25 | | -## Notes |
26 | | - |
27 | | -- This is a syntax-highlighting scaffold only. |
28 | | -- It does not add CLI commands, formatting, linting, or diagnostics. |
| 14 | +- block names such as `LeadQualification` or `OrderLifecycle` |
| 15 | +- section keywords such as `states`, `transitions`, `applies to`, `can`, `cannot`, `formula`, `owner`, and `target` |
| 16 | +- core statements such as `when`, `if`, `else`, `then`, `assign`, `transition`, `notify`, `create`, `update`, `require`, and `stop` |
| 17 | +- operator forms such as `=`, `!=`, `<`, `<=`, `>`, `>=`, and `->` |
| 18 | +- dotted references such as `lead.status` and `lead.created` |
| 19 | +- strings, booleans, and numeric literals |
| 20 | + |
| 21 | +OrgScript does not define an official comment syntax in the language spec yet, so this extension intentionally does not add comment highlighting. |
| 22 | + |
| 23 | +## Local testing in VS Code |
| 24 | + |
| 25 | +1. Open the repository in VS Code. |
| 26 | +2. Open the `editors/vscode/` folder as the extension project if you want to inspect the extension files directly. |
| 27 | +3. Press `F5` in VS Code while `editors/vscode/` is the active extension workspace. |
| 28 | +4. In the Extension Development Host, open one of these files: |
| 29 | + - `examples/craft-business-lead-to-order.orgs` |
| 30 | + - `examples/order-approval.orgs` |
| 31 | + - `examples/service-escalation.orgs` |
| 32 | +5. Confirm that the language mode is `OrgScript` and that blocks, statements, strings, operators, and dotted references are highlighted. |
| 33 | + |
| 34 | +## Good demo files |
| 35 | + |
| 36 | +- `examples/craft-business-lead-to-order.orgs` |
| 37 | + Good for `process`, `if`, strings, dotted references, operators, and `stateflow`. |
| 38 | +- `examples/order-approval.orgs` |
| 39 | + Good for `stateflow`, `rule`, `applies to`, and transitions. |
| 40 | +- `examples/service-escalation.orgs` |
| 41 | + Good for `policy`, `event`, `metric`, and role-oriented language. |
| 42 | + |
| 43 | +## Current scope |
| 44 | + |
| 45 | +- TextMate grammar only |
| 46 | +- no semantic tokens |
| 47 | +- no IntelliSense |
| 48 | +- no snippets |
| 49 | +- no hover provider |
| 50 | +- no diagnostics integration |
| 51 | +- no editor-driven formatting |
0 commit comments