A JetBrains IDE plugin providing syntax highlighting and editor support for the Antlers template language used by Statamic CMS.
- Syntax Highlighting for
.antlers.htmland.antlers.phpfiles- Variables, tags, modifiers, operators, keywords
- String and number literals
- Comments (
{{# #}}) - PHP regions (
{{? ?}},{{$ $}}) - Semantic colors for tag names, parameter names, and more
- HTML Intelligence Preserved -- full HTML/CSS/JS support within template files via IntelliJ's Template Language framework
- Code Completion -- Statamic tags, modifiers, and variables with descriptions from the official docs
- Hover Documentation -- quick docs with examples and links to statamic.dev
- PHP Intelligence -- full PHP support inside
{{? ?}}and{{$ $}}blocks with highlighting, completion, and formatting from your PhpStorm settings - Alpine.js Support -- JavaScript intelligence inside Alpine attributes (
x-data,@click,x-bind, etc.) with method navigation back tox-data - Partial Navigation -- Cmd-click on
partial:nameto jump to the partial file - Antlers Language Server -- integrated Stillat LSP for formatting and diagnostics (bundled, requires Node.js)
- Tag Parameter Completion -- suggests official parameters (
from=,limit=,sort=, etc.) for common Statamic tags - Scope-Aware Variables -- suggests
title,slug,url,first,last,count, etc. inside collection/nav/taxonomy loops - Collection Handle Completion --
{{ collection: }}suggests handles from flat-file or Eloquent driver (queries database via artisan) - Go-To Custom Tags/Modifiers -- Cmd-click navigates to PHP classes in
app/Tags/andapp/Modifiers/ - Extract to Partial -- select code, Alt+Enter to extract into a new partial file
- Structure View -- Antlers tags + HTML landmarks (
<header>,<main>,<section>, etc.) in document order with nested tag pair children - Formatting -- template-aware formatting with block tag indentation for
collection,nav,cache,foreach,entries,groups,items, and more - Auto-Close Tags -- typing
{{ /auto-completes the closing tag name; Enter after block tags auto-indents - Brace Matching -- highlights matching
{{ }}pairs - Block Commenting -- toggle comments with
{{# #}}via Ctrl+/ (Cmd+/) - Typing Aids -- auto-closing braces, smart quotes, and smart enter handling
- Status Bar Widget -- shows Statamic indexing status with resource counts, driver detection, and auto-index toggle
- Statamic Menu -- top-level menu with controller, tag, and modifier generators plus content query snippets
- Customizable Colors -- Settings > Editor > Color Scheme > Antlers, including underlined partial paths
| Construct | Example |
|---|---|
| Variables | {{ title }}, {{ post:title }} |
| Tags | {{ collection:blog limit="5" }}...{{ /collection:blog }} |
| Modifiers | {{ title | upper | truncate(50) }} |
| Conditionals | {{ if }}, {{ elseif }}, {{ else }}, {{ unless }} |
| Operators | ==, !=, &&, ||, ??, ?:, +, -, *, / |
| Assignment | {{ total = price * quantity }} |
| Comments | {{# This is a comment #}} |
| PHP | {{? $var = doSomething(); ?}}, {{$ route('home') $}} |
| Self-closing | {{ partial:hero /}} |
| Escaped | @{{ not_parsed }} |
Coming soon
git clone https://github.com/portseif/statamic-toolkit-phpstorm.git
cd statamic-toolkit-phpstorm
./gradlew runIdeThis launches a sandboxed IDE instance with the plugin installed.
- IntelliJ IDEA / PhpStorm 2024.2+
- JDK 21
./gradlew build # Build the plugin
./gradlew test # Run tests
./gradlew runIde # Launch sandbox IDE
./gradlew buildPlugin # Package as .zip for distribution- Syntax highlighting
- Brace matching
- Block commenting
- HTML/CSS/JS intelligence in template files
- Code completion for Statamic tags and modifiers
- Go-to-definition for partials
- Formatting support
- Structure view
- Alpine.js support
- PHP intelligence in PHP blocks
- Hover documentation
- Statamic generators (controllers, tags, modifiers)
- Configurable settings panel
- Code folding for tag pairs
- Tag parameter completion
- Scope-aware variable completion
- Go-to custom tag/modifier definition
- Extract to partial refactoring
- Antlers Language Server integration
- Eloquent driver support
- Status bar indexing widget
- Live templates / snippets
- Blueprint field completion
This plugin is not affiliated with, endorsed by, or officially connected to Statamic. "Statamic" and the Statamic logo are trademarks of Statamic.
MIT