Lemon for VS Code Enhanced Lemon language support for Sonic 3 A.I.R. development in Visual Studio Code. This extension builds on the original Lemon language support and adds formatting, navigation, completions, diagnostics, and S3AIR-specific tooling. Features Syntax Highlighting Full Lemon grammar support with improved tokenization for: Functions (declaration and calls) Types and primitives Constants and defines Registers (A0–A7, D0–D7) Preprocessor directives (#if, #else, #endif, #define) Built-in context objects (base, char, objA0, objA1) Directive comments (//# ...) Formatting Document formatter for .lemon files: Allman-style brace formatting ({ and } on their own lines) Automatic indentation based on brace depth Handles control flow (if, else, for, while) Idempotent formatting (safe to run multiple times) Respects VS Code indentation settings Usage Open a .lemon file Run Format Document With… Select Lemon for VS Code After setup, use: Shift + Alt + F or enable Format on Save Intelligent Completions Built-in Lemon symbol completions Workspace-wide function discovery Global / constant suggestions Context-aware local variable suggestions Dotted completions: char. base. objA0. objA1. Completions prioritize: Local scope variables Workspace symbols Built-ins and namespaces Navigation Go to Definition for: Local functions Workspace functions Outline view support: Functions Globals Constants Defines Folding via region markers: // {{ // }} Address Hook Support (S3AIR) Reads generated hooks.json Hover information for known base functions Diagnostics for missing directive blocks Quick Fix to insert correct directive block Gutter decoration for recognized base functions 🎮 Game Integration Launch Sonic 3 A.I.R. (Windows builds) directly from VS Code. A ▶ Play S3AIR button is available in the status bar. Setup Configure your game executable path: "lemon.gameExePath": "C:\Path\To\Sonic3AIR.exe" Open: Settings → Open Settings (JSON) If not configured, the extension will display an error when attempting to launch. 🎨 Included Themes This extension includes Lemon-optimized themes designed specifically for S3AIR scripting. All themes are tuned to the Lemon grammar included in this extension. 🔵 S3AIR Lemon: Team Sonic (Dark) Sonic-blue control keywords Cyan built-in objects (base, char, etc.) Gold function declarations and calls Clear numeric and register distinction 🟢 S3AIR Lemon: Team Chaotix (Dark) Teal + mint structure Violet numeric literals Honey-gold function accents Clean cyan directives 🌸 SilicDevTheme – Team Rose (Dark) Rose control keywords Cyan system references Gold function names Soft neon aesthetic 🔴 SilicDevTheme – Team Dark (Shadow) Near-black base Crimson control flow Cyan built-in objects Gold function accents High contrast without eye strain Design Goals Clear visual distinction between: Control flow Types Built-in context objects Function declarations Function calls Consistent directive comment styling Readable neon aesthetic on dark backgrounds Optimized for large S3AIR Lemon scripts License MIT License Original Lemon language support by Serghei Iakovlev. Extended and enhanced for S3AIR development. |