Syntax highlighting and color themes for Pyret (.arr) files. Uses the real Pyret tokenizer for accurate highlighting. Includes both Pyret Light and Pyret Dark (One Dark Pro) color themes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
A VS Code extension that provides syntax highlighting and color themes for the Pyret programming language (.arr files).
This extension uses the real Pyret tokenizer (the same one used by code.pyret.org) via VS Code's Semantic Tokens API, ensuring accurate and context-aware highlighting.
Included Themes
☀️ Pyret Light — clean white background with official colors from code.pyret.org
🌙 Pyret Dark (One Dark) — sleek dark mode based on Atom's popular One Dark Pro palette (#282c34)
Features
🔤 Accurate syntax highlighting via the actual Pyret tokenizer (not just regexes)
Choose either "Pyret Light" or "Pyret Dark (One Dark)"
How it works
The extension embeds a copy of the Pyret CodeMirror tokenizer (pyret.js) and adapts it to run in Node.js using a custom CodeMirror Stream emulator. It registers a DocumentSemanticTokensProvider that tokenizes each file using the real Pyret parser state machine, producing accurate token classification that regex-based TextMate grammars cannot achieve.