Rohas DSL Language VSCode Extension
VSCode extension for the Rohas language, providing syntax highlighting, snippets, and integrated commands.
Features
- ✨ Syntax Highlighting - Full syntax highlighting for Rohas files (
.ro)
- 📝 Code Snippets - Pre-built snippets for common patterns
- 🔍 Analyze Command - Analyze Rohas files for errors
- ▶️ Run Command - Execute Rohas files directly from VSCode
- ⚡ Optimize Command - Optimize Rohas files for token usage
- 🎨 Language Support - Full language configuration with auto-closing brackets, comments, etc.
Installation
From Source
- Clone the repository
- Navigate to the
vscode-extension directory
- Install dependencies:
npm install
- Compile:
npm run compile
- Press
F5 to open a new VSCode window with the extension loaded
Package Extension
- Install
vsce: npm install -g @vscode/vsce
- Package the extension:
vsce package
- Install the
.vsix file in VSCode
Usage
Commands
- Rohas: Analyze - Analyze the current Rohas file for errors
- Rohas: Run - Execute the current Rohas file
- Rohas: Optimize - Optimize the current Rohas file for token usage
Configuration
Configure the extension in VSCode settings:
{
"rohas.llmProvider": "openai",
"rohas.apiKey": "your-api-key",
"rohas.baseUrl": "",
"rohas.defaultModel": "gpt-4"
}
Requirements
- VSCode 1.74.0 or higher
- Rust and Cargo installed (for running Rohas files)
- Rohas CLI built and available
Development
- Install dependencies:
npm install
- Compile TypeScript:
npm run compile
- Watch for changes:
npm run watch
- Press
F5 to debug the extension
License
MIT OR Apache-2.0
| |