Language support for the Echo DSL — a dynamic prompt templating language.
Full TextMate grammar support for .echo and .echo.md files:
- Variables:
{{variable}},{{user.name ?? "default"}} - Control blocks:
[#IF ...],[ELSE],[END IF] - Operators:
#equals(),#contains(),#ai_judge() - Directives:
[#IMPORT ...],[#INCLUDE ...],[#SECTION ...] - Comments:
[#-- comment --]
Real-time validation as you type:
- Unclosed blocks — detects unmatched
[#IF]or[#SECTION]blocks - Unknown operators — flags
#operatorpatterns not in the known list - Empty variables — catches
{{ }}with no variable name - Unused sections — warns about
[#SECTION]blocks never referenced by[#INCLUDE]
Context-aware completions:
- Inside conditions — suggests operators (
#equals,#contains, etc.) with type signatures - At line start — suggests directives (
[#IF,[#SECTION,[#IMPORT, etc.) - After
#— suggests all operators and#context()
Quick templates for common patterns:
#if→ Full IF block with placeholders#ifelse→ IF-ELSE block#elif→ ELSE IF clause#section→ SECTION block#import→ IMPORT directive#include→ INCLUDE directive#context→ Context reference#var→ Variable{{...}}- All operators:
#equals,#contains,#matches,#in,#gt,#gte,#lt,#lte,#exists,#ai_judge
Automatic JSON validation and autocomplete for echo.config.json files.
| Extension | Description |
|---|---|
.echo |
Echo template files |
.echo.md |
Echo templates with Markdown |
- Bracket matching for
[ ],( ),{{ }} - Auto-closing pairs for brackets, braces, quotes
- Code folding for
[#IF]/[END IF]and[#SECTION]/[END SECTION]blocks - Auto-indentation inside blocks
- Block/line commenting with
[#-- --]
# Install dependencies
npm install
# Compile
npm run compile
# Watch mode
npm run watch
# Launch in Extension Development Host
# Press F5 in VS CodeMIT