Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Laravel WarrantNew to Visual Studio Code? Get it now.
Laravel Warrant

Laravel Warrant

Patrick Hanna

| (0) | Free
Syntax highlighting for the Warrant authorization rule language, including inside PHP heredocs labelled WARRANT.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Warrant DSL — VS Code

Syntax highlighting for the Warrant authorization rule language.

Features

  • Highlighting for standalone .warrant files.

  • Highlighting inside PHP for heredocs/nowdocs labelled WARRANT:

    $rules = WarrantRuleSet::fromSyntax('timesheets', <<<'WARRANT'
        # only the author may edit their own draft
        if is_self
        they can edit, view
        they cannot approve
        WARRANT);
    

    The label is the trigger — name the heredoc WARRANT and the body lights up. Any other label is treated as a plain PHP string.

Highlighted tokens

Keywords (if they can cannot and or not), string literals with \' / \\ escapes, numbers, true/false/null, @context, :named bindings, positional ?, the * wildcard, and # line comments.

Before publishing

Set publisher in package.json to your VS Code Marketplace publisher id (it is currently REPLACE_WITH_YOUR_PUBLISHER_ID).

Publishing

npm i -g @vscode/vsce
vsce package          # -> warrant-dsl-<version>.vsix (share or drag-install)
vsce login <publisher>
vsce publish          # publish to the Marketplace

Local install without publishing

vsce package
code --install-extension warrant-dsl-<version>.vsix
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft