diff --git a/editors/vscode/README.md b/editors/vscode/README.md index 71b0148..e3410e4 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -76,6 +76,17 @@ Current editor support for annotations: - `org-metric` - `org-event` +## Local Testing + +To test the extension locally without publishing it: + +1. Open the `editors/vscode` folder in VS Code. +2. Press **F5** to launch the Extension Development Host (configured in `.vscode/launch.json`). +3. In the new VS Code window, open any `.orgs` file from the repository `examples/` folder (one level up). +4. Use **Developer: Inspect Editor Tokens and Scopes** (via the Command Palette) to verify that tokens receive the expected TextMate scopes. + +Recommended test file: `../examples/lead-qualification.orgs` — it exercises the header, annotations, dotted references, operators, and conditional blocks together. + ## Contributing OrgScript is open-source. Join us on [GitHub](https://github.com/DKFuH/OrgScript) to contribute to the language spec or tooling. diff --git a/editors/vscode/syntaxes/orgscript.tmLanguage.json b/editors/vscode/syntaxes/orgscript.tmLanguage.json index fc53094..e648003 100644 --- a/editors/vscode/syntaxes/orgscript.tmLanguage.json +++ b/editors/vscode/syntaxes/orgscript.tmLanguage.json @@ -203,16 +203,27 @@ "operators": { "patterns": [ { - "match": "(!=|<=|>=|->|=|<|>)", - "name": "keyword.operator.orgscript" + "match": "->", + "name": "keyword.operator.arrow.orgscript" + }, + { + "match": "(!=|<=|>=|=|<|>)", + "name": "keyword.operator.comparison.orgscript" } ] }, "references": { "patterns": [ { - "match": "\\b[A-Za-z_][A-Za-z0-9_-]*(?:\\.[A-Za-z_][A-Za-z0-9_-]*)+\\b", - "name": "variable.other.property.orgscript" + "match": "\\b([A-Za-z_][A-Za-z0-9_-]*)((?:\\.[A-Za-z_][A-Za-z0-9_-]*)+)\\b", + "captures": { + "1": { + "name": "variable.other.object.orgscript" + }, + "2": { + "name": "variable.other.property.orgscript" + } + } } ] }