A PHPStorm plugin that provides CSS class completion and navigation for the Elem PHP templating library.
- CSS Class Completion: Get autocomplete suggestions for CSS classes when typing in
class:parameters of Elem functions - Navigation: Ctrl+Click on CSS class names to jump to their definitions in CSS files
- Multi-class Support: Works with space-separated class names like
'btn btn-primary'
The plugin recognizes all Elem helper functions:
div(),span(),p(),a(),h()img(),button(),input(),form(),label()ul(),ol(),li()table(),tr(),td(),th()el(),nav(),header(),footer(),section(),article()- And more...
Once installed, the plugin automatically activates when you use Elem functions with the class: named parameter:
div(class: 'container')( // <- Ctrl+Click 'container' to navigate
h(1, class: 'title'), // <- CSS completion available here
p(class: 'intro-text')
)./gradlew buildPluginThe plugin ZIP will be created in build/distributions/.
- Build the plugin or download from releases
- In PHPStorm: Settings → Plugins → ⚙️ → Install Plugin from Disk
- Select the plugin ZIP file
- Restart PHPStorm
- JDK 21+
- Gradle 8.11+
./gradlew runIdeThis will launch a sandboxed PHPStorm instance with the plugin installed.
MIT License