Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Grule Rule Language (GRL) Syntax & SnippetsNew to Visual Studio Code? Get it now.
Grule Rule Language (GRL) Syntax & Snippets

Grule Rule Language (GRL) Syntax & Snippets

Ton That Vu

|
3 installs
| (1) | Free
VS Code extension for Grule Rule Language (.grl) syntax highlighting and snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GRL Syntax Highlighting for VS Code

A professional Visual Studio Code extension for Grule Rule Language (GRL) syntax highlighting, auto-completion, and rule authoring.
Designed for Rust Rule Engine, Drools-compatible workflows, and advanced business rule systems.


✨ Features

  • Syntax Highlighting: Full GRL keyword, attribute, function, action, and pattern highlighting.
  • Auto-complete Snippets: Quickly insert rule templates, attributes (no-loop, agenda-group, activation-group, etc.), actions, and patterns.
  • Function Detection: Automatically highlights function names (e.g. log, update, sendEmail) before (.
  • Advanced Attribute Support: Supports all Drools-style attributes: no-loop, agenda-group, activation-group, lock-on-active, date-effective, date-expires, salience.
  • Works with .grl files: Just open or create a .grl file and start writing!

📸 Screenshots

Syntax Highlighting Example


🚀 Quick Start

  1. Install:
    • Download from VS Code Marketplace (after publish).
    • Or run:
      code --install-extension grl-syntax-highlighting-<version>.vsix
      
  2. Open a .grl file:
    • Start typing GRL rules, attributes, actions, and functions.
    • Use auto-complete for fast rule authoring.

📝 Example

rule "VIPCustomerWelcome" salience 20 no-loop agenda-group "welcome" {
    when
        Customer.tier == "VIP" && Customer.welcome_sent != true
    then
        SendEmail(Customer.email, "VIP Welcome Package", "Welcome to our VIP program!");
        LogToDatabase("customer_events", "vip_welcome_sent");
        Customer.welcome_sent = true;
}

⚡ Supported GRL Features

  • Keywords: rule, when, then, salience, exists, forall, not, true, false
  • Attributes: agenda-group, activation-group, lock-on-active, no-loop, date-effective, date-expires
  • Actions/Functions: Auto-highlight and snippet support for all common GRL actions and functions
  • Pattern Matching: exists(...), forall(...), !exists(...)
  • String & Number Highlighting

🔧 Requirements

  • Visual Studio Code v1.60 or higher
  • No additional dependencies

⚙️ Extension Settings

This extension does not add custom settings.
Just install and use!


🐞 Known Issues

  • If you find any issues, please report them on GitHub Issues.

📦 Release Notes

1.0.0

  • Initial release: syntax highlighting, auto-complete snippets, advanced attribute support.

🤝 Contributing

Pull requests and feedback are welcome!
See CONTRIBUTING.md for details.


📚 More Information

  • Grule Rule Engine
  • Rust Rule Engine
  • Drools Documentation

**Enjoy professional GRL authoring in VS

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft