Merged
Conversation
Agent-Logs-Url: https://github.com/DKFuH/OrgScript/sessions/2eedd53a-c4c5-49e1-9da5-f9de2c3b39cb Co-authored-by: DKFuH <[email protected]>
Copilot
AI
changed the title
[WIP] Improve VS Code syntax highlighting for OrgScript files
Polish VS Code syntax highlighting scopes
Apr 1, 2026
DKFuH
approved these changes
Apr 1, 2026
Owner
DKFuH
left a comment
There was a problem hiding this comment.
Looks good overall.\n\nNotes\n- Thanks for splitting the operator scopes (arrow vs comparison) and the dotted reference captures.\n- I added a tiny doc tweak so local testing points to the correct examples path when the workspace is editors/vscode.\n\nNo blocking issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The initial TextMate grammar lumped the transition arrow and comparison operators into a single scope, and highlighted dotted references as a monolithic token — making it hard for themes to apply meaningful colour distinctions.
Grammar (
syntaxes/orgscript.tmLanguage.json)Operators split by semantics:
->→keyword.operator.arrow.orgscript(state transition arrow, not a comparator)=,!=,<,<=,>,>=→keyword.operator.comparison.orgscriptDotted references split into object + property:
lead→variable.other.object.orgscript.status→variable.other.property.orgscriptBefore:
lead.statuswas a singlevariable.other.propertytoken.After: object and property halves are independently scopeable by themes.
{ "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" } } }Docs (
editors/vscode/README.md)Added a Local Testing section: F5 → Extension Development Host, then use Developer: Inspect Editor Tokens and Scopes to verify scopes. Points to
examples/lead-qualification.orgsas the canonical test file.