Elsafile Language Support

A Visual Studio Code extension that provides Elsafile with syntax highlighting - the build automation language used in the Elsa project.
Features
- 🎨 Syntax Highlighting - Beautiful syntax highlighting for Elsafile code
- 🔧 Language Support - Full language recognition and IntelliSense
- 🎯 File Association - Automatic detection of
Elsafile
files
- 🖼️ Custom Icon - Distinctive icon for Elsafile files in the explorer
- ⚡ Fast Performance - Optimized for large Elsafile projects
- 🚀 One-Click Execution - Run commands directly in terminal with CodeLens
- ▶️ Auto-Detection - Automatically detects command definitions (lines ending with
:
)
- 💻 Terminal Integration - Commands run in VS Code integrated terminal (supports interactive input)
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Elsafile"
- Click Install
From Source
- Clone this repository
- Run
npm install
to install dependencies
- Run
build.bat
to build the extension
- Press F5 to open a new VS Code window with the extension loaded
Usage
This extension automatically activates when you open files with the following patterns:
- Files named exactly
Elsafile
(without extension)
- Files with
.Elsafile
extension
Supported File Types
Elsafile
- Main Elsafile scripts
*.elsafile
- Elsafile files with extension
Running Commands
The extension automatically detects command definitions in your Elsafile and provides "Run" buttons above each command.
Command Detection Rules:
- Line starts without spaces or tabs
- Line ends with a colon (
:
)
- No spaces in the line (except after the colon)
Example:
# This will show a "Run" button
build:
go build -o bin/app .
# This will also show a "Run" button
test:
go test ./...
# This will NOT show a "Run" button (has spaces)
install-tools:
go install go.risoftinc.com/elsa/cmd/elsa@latest
To run a command:
- Look for the "▶ Run: command_name" button above each command
- Click the button to execute the command in terminal
- View the output in the integrated terminal (supports interactive input)
About Elsa
This extension is designed to work with the Elsa project - a powerful build automation and workflow management system. Elsafile is the configuration language used to define build processes, workflows, and automation tasks.
Key Features of Elsa:
- 🚀 Build Automation - Define complex build processes
- 🔄 Workflow Management - Create and manage automated workflows
- 📦 Dependency Management - Handle project dependencies efficiently
- 🎯 Task Orchestration - Coordinate multiple build tasks
Extension Features
Syntax Highlighting
- Keywords and operators
- Strings and comments
- Function definitions
- Variable declarations
- Build configuration blocks
Language Support
- Auto-completion
- Error detection
- Code folding
- Bracket matching
Contributing
We welcome contributions! Please feel free to submit issues and pull requests.
Development Setup
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Building from Source
# Install dependencies
npm install
# Build the extension
build.bat
# Package for distribution
vsce package
Requirements
- Visual Studio Code 1.74.0 or higher
- Node.js (for development)
Release Notes
1.0.0
- Initial release
- Basic syntax highlighting for Elsafile
- File association support
- Custom icon integration
- Language configuration
- NEW: CodeLens support with one-click command execution
- NEW: Automatic command detection (lines ending with
:
)
- NEW: Integrated terminal output display
- NEW: Elsa CLI integration
License
This project is licensed under the MIT License - see the LICENSE file for details.
Links
Support
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Join our community discussions
Made with ❤️ by Risoftinc