This extension adds:
- RexScript language registration for
.rexfiles - TextMate syntax highlighting
- Standalone keyword completions, snippets, hovers, and quick fixes
- Custom
rsfile icon mapping for.rex - Repo-backed diagnostics and command palette actions grouped under
RexScript - Mode picker (
default,strict,dynamic) when running commands - Streaming command output in the
RexScriptoutput channel
Standalone vs Repo-Backed Features
This extension is safe to install on its own from the Marketplace.
Standalone features work immediately after install:
- syntax highlighting
- file icons
- keyword completions
- snippets
- hover docs
- quick fixes for common authoring issues
Compiler-backed features require a workspace that contains the RexScript compiler:
- live diagnostics
Check,Compile,Run, andTracecommands
The extension looks for the compiler in one of these workspace paths:
rexscript/compilercompiler
If no compiler is found, the extension stays in standalone authoring mode and shows a friendly message instead of failing silently.
Local Development
- Open this folder in VS Code:
rexscript/extensions/vscode-rexscript
- Install dependencies if needed (none required for runtime).
- Press
F5to launch an Extension Development Host. - Open any
.rexfile and verify highlighting, snippets, and hovers.
Commands
Use the Command Palette and search for RexScript:
RexScript: Open RexScript Command MenuRexScript: Check Current RexScript FileRexScript: Compile Current RexScript FileRexScript: Run Current RexScript FileRexScript: Trace Current RexScript File
You can also run a .rex file directly from the editor title bar using the play button.
When you run any command:
- The active
.rexfile is validated and saved if dirty. - If the compiler workspace is available, you choose a mode (
default,strict, ordynamic). - Output streams to the
RexScriptoutput panel.
If the compiler is not present, the extension explains how to enable repo-backed features instead of showing a broken command experience.
File Icons
To use the custom rs icon mapping:
- Open Command Palette.
- Run
Preferences: File Icon Theme. - Select
RexScript File Icons.
Packaging
Install vsce globally and package:
npm i -g @vscode/vsce
cd rexscript/extensions/vscode-rexscript
vsce package
This creates a .vsix file that can be installed in VS Code.