Skip to content

About

VS Code extension for Echo PDK - dynamic prompt templating language

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Echo PDK - VS Code Extension

Language support for the Echo DSL — a dynamic prompt templating language.

Features

Syntax Highlighting

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 --]

Diagnostics

Real-time validation as you type:

  • Unclosed blocks — detects unmatched [#IF] or [#SECTION] blocks
  • Unknown operators — flags #operator patterns not in the known list
  • Empty variables — catches {{ }} with no variable name
  • Unused sections — warns about [#SECTION] blocks never referenced by [#INCLUDE]

Autocomplete

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()

Snippets

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

Config Schema Validation

Automatic JSON validation and autocomplete for echo.config.json files.

Supported File Extensions

Extension Description
.echo Echo template files
.echo.md Echo templates with Markdown

Editor Features

  • 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 [#-- --]

Development

# Install dependencies
npm install

# Compile
npm run compile

# Watch mode
npm run watch

# Launch in Extension Development Host
# Press F5 in VS Code

Related

License

MIT

About

VS Code extension for Echo PDK - dynamic prompt templating language

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages