This extension provides comprehensive language support for the Rich Communication Language (RCL), a domain-specific language for creating RCS (Rich Communication Services) agents.
- Syntax Highlighting: Full TextMate grammar support for RCL syntax
- Language Configuration: Auto-closing pairs, brackets, indentation rules
- Code Completion: Context-aware completions for RCL keywords and structures
- Hover Information: Helpful documentation on hover for RCL constructs
- Document Symbols: Navigate your RCL files with the outline view
- Code Formatting: Automatic formatting with consistent indentation
- Folding Ranges: Collapse agent, flow, and message sections
- Error Detection: Basic syntax validation and diagnostics
- Go to Definition: Navigate to symbol definitions
- Find References: Find all usages of symbols
- Rename Symbols: Rename symbols across files
- Semantic Tokens: Enhanced syntax highlighting
- Code Actions: Quick fixes and refactoring suggestions
- Embedded Language Support: JavaScript/TypeScript support in expressions
- Cross-file Analysis: Multi-file project support
- Clone the repository
- Navigate to
apps/extension - Run
npm install - Run
npm run compile - Open VS Code and go to Extensions
- Click "Install from VSIX" and select the generated
.vsixfile
Search for "RCL Language Support" in the VS Code Extensions marketplace.
- Create a new file with the
.rclextension - Start typing RCL code - the extension will provide:
- Syntax highlighting
- Code completion (Ctrl+Space)
- Error checking
- Formatting (Shift+Alt+F)
agent TestAgent
displayName: "Test RCS Agent"
description: "A sample RCS agent"
configuration
webhook_url: "https://example.com/webhook"
timeout: 30s
flow MainFlow
start: Greeting
on Greeting
-> WelcomeMessage
messages
text WelcomeMessage "Welcome to our service!"
The extension can be configured through VS Code settings:
{
"rcl.validation.enabled": true,
"rcl.completion.enabled": true,
"rcl.formatting.enabled": true,
"rcl.server.maxNumberOfProblems": 100,
"rcl.trace.server": "off"
}This extension uses the Language Server Protocol (LSP) for optimal performance:
- Client: VS Code extension that manages the language server
- Server: Node.js language server providing language features
- Parser: Tree-sitter based parser for accurate syntax analysis
npm install
npm run compilenpm test- Open the extension in VS Code
- Press F5 to launch Extension Development Host
- Open a
.rclfile to test the extension
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Agent: Top-level definition of an RCS agent
- Flow: Conversation flow with states and transitions
- Messages: Reusable message templates
- Configuration: Agent configuration settings
- Defaults: Default values
agent,flow,messages,configuration,defaults,importTrue,False,Yes,No,On,Off,Enabled,DisabledNull,None,Void
- Strings:
"text"or multiline with|,|-,+|,+|+ - Numbers:
42,3.14,1e10 - Durations:
30s,5m,P1Y2M3DT4H5M6S - Atoms:
:symbol,:start,:end - Type Tags:
<phone|+1234567890>,<email|user@example.com>
MIT License - see LICENSE file for details.