- Update
gradle.propertieswith the new plugin version - Update
CHANGELOG.mdto reflect the new changes in the Unreleased section - Push
mainbranch and allow all GitHub Actions to run - Go to releases page and edit/publish draft release
This plugin adds support for the following Alpine.js features:
- Auto-complete alpine directives such as
x-data - Set the language to JavaScript inside your directives so that you have full syntax highlighting and code complete
-
Using IDE built-in plugin system:
Preferences > Plugins > Marketplace > Search for "Alpine.js Support" > Install Plugin
-
Manually:
Download the latest release and install it manually using Preferences > Plugins > ⚙️ > Install plugin from disk...
The Alpine.js Support plugin provides solid foundational features, but there are many opportunities to enhance the developer experience. Here are potential improvements organized by priority:
-
Go to Declaration & Find Usages: Navigate between x-data property definitions and their usage across components. This would allow developers to quickly jump between related code sections.
-
Refactoring Support: Enable renaming of Alpine properties/methods with automatic updates across all references. This is essential for maintaining large Alpine.js applications.
-
Code Inspections: Add intelligent inspections to catch common mistakes:
- Undefined property usage in Alpine expressions
- Deprecated Alpine v2 syntax when using v3
- Missing required modifiers (e.g.,
.preventon form submissions) - Performance anti-patterns
-
Test Coverage: Implement comprehensive unit and integration tests to ensure plugin stability and make future development safer.
-
Live Templates: Provide code snippets for common Alpine patterns:
- Component boilerplate with x-data
- Common directive combinations (x-show with x-transition)
- Alpine store definitions
- Event handler patterns
-
Quick Documentation: Show inline documentation for Alpine directives and modifiers on hover or with F1/Ctrl+Q.
-
Structure View: Display Alpine component hierarchy in the IDE's structure panel, showing x-data scopes and their properties.
-
Enhanced Type Support: Improve JavaScript/TypeScript type inference within Alpine expressions for better auto-completion and error detection.
-
Debugging Support: Special debugging features for Alpine components, such as inspecting reactive data state.
-
Code Generation: Actions to quickly generate:
- Alpine components from templates
- Store definitions
- Common patterns (modals, dropdowns, etc.)
-
Performance Analysis: Tools to analyze component complexity and suggest optimizations.
-
Plugin Ecosystem Support: Add support for popular Alpine plugins like Alpine Morph, Persist, Focus, and Intersect.
-
Better Error Handling: Provide clearer error messages and recovery options when things go wrong.
-
Performance Optimizations: Profile and optimize completion providers and inspections for better IDE performance.
-
Configuration Options: Allow users to customize plugin behavior, such as:
- Preferred Alpine version for syntax checking
- Custom directive definitions for third-party plugins
- Code style preferences
-
Project-wide Analysis: Analyze entire projects to find unused Alpine components or properties.
Plugin based on the IntelliJ Platform Plugin Template.
