FEEL Expression Language


Complete FEEL (Friendly Enough Expression Language) support for Visual Studio Code with advanced syntax highlighting and intelligent auto-formatting.
Features
🎨 Syntax Highlighting
- Rich color coding for FEEL keywords, operators, and functions
- Smart property highlighting with improved visibility
- Context-aware highlighting for different identifier types
- Built-in function recognition with proper scoping
- String and numeric literal highlighting
- Smart indentation for nested expressions and control structures
- Configurable formatting rules
- Preserve user intent while maintaining consistent style
- Format on save support
⚡ Developer Experience
- Go to Definition -
Ctrl+Click
(Windows/Linux) or Cmd+Click
(macOS) to navigate to property definitions
- Find All References - Find all usages of a property across the file
- Auto-closing brackets and quotes (
{}
, []
, ()
, ""
)
- Smart bracket matching with visual indicators
- Comment toggling support (
//
and /* */
)
- Code folding for better navigation
- Word-based navigation optimized for FEEL identifiers
🔍 FEEL Previewer
- Real-time Expression Evaluation - Test FEEL expressions with live context data
- JSON Context Input - Provide context variables in JSON format for expression evaluation
- Instant Results - See evaluation results with type information and error handling
- Automatic Expression Sync - Previewer automatically updates when you edit FEEL files
- Error Feedback - Clear error messages for invalid expressions or context
- Side Panel Integration - Opens conveniently beside your FEEL editor
Commands
Command Palette
FEEL: Format Document
- Format entire FEEL file
FEEL: Open FEEL Previewer
- Open the side previewer panel for expression evaluation
Keyboard Shortcuts
Shift+Alt+F
(Windows/Linux) or Shift+Option+F
(macOS) - Format FEEL document (when FEEL file is active)
Shift+Alt+P
(Windows/Linux) or Shift+Option+P
(macOS) - Open FEEL Previewer (when FEEL file is active)
- Right-click in FEEL file →
Format Document
- Right-click in FEEL file →
Open FEEL Previewer
Editor Title Bar
- Click the preview icon (📄) in the editor title bar to open the FEEL Previewer
Using the FEEL Previewer
The FEEL Previewer allows you to test and evaluate FEEL expressions with real context data:
- Open a FEEL file (
.feel
extension)
- Launch the previewer using any of the methods above (
Shift+Alt+P
, Command Palette, or editor title bar)
- Enter context data in JSON format in the Context input area
- Click "Evaluate Expression" to see the result
Example Usage
FEEL Expression (in your .feel
file):
if age >= 18 then "adult" else "minor"
Context JSON (in the previewer):
{
"age": 25,
"name": "John"
}
Result: "adult"
Advanced Features
- Complex Objects: Test with nested objects, arrays, and complex data structures
- Built-in Functions: Use FEEL functions like
now()
, date and time()
, string()
, etc.
- Error Handling: Get clear error messages for invalid expressions or context
- Auto-sync: The previewer automatically updates when you edit your FEEL file
Configuration
{
"feel.formatting.enable": true,
"feel.formatting.indentSize": 2,
"feel.formatting.insertFinalNewline": true,
"[feel]": {
"editor.formatOnSave": true
}
}
File Support
The extension automatically activates for files with .feel
extension.
License
This project is licensed under the MIT License.
Copyright (c) 2025 Ahmad Alhowimel