This plugin provides comprehensive IDE support for the Phel programming language in JetBrains IDEs (IntelliJ IDEA, PhpStorm, WebStorm, etc.).
Phel is a functional programming language that transpiles to PHP. It is a dialect of Lisp inspired by Clojure and Janet.
- Open your JetBrains IDE (IntelliJ IDEA, PhpStorm, etc.)
- Go to File → Settings → Plugins (or IntelliJ IDEA → Preferences → Plugins on macOS)
- Search for "Phel"
- Click Install and restart the IDE
- Syntax Highlighting - Full lexer-based syntax highlighting for Phel code
- Code Completion - Intelligent completion for core functions, namespaces, and symbols
- Documentation Popups - Hover over functions to see detailed documentation with examples
- Bracket Matching - Automatic matching and highlighting of parentheses, brackets, and braces
- Code Folding - Collapse/expand code blocks for better navigation
- Smart Typing - Auto-completion of brackets and quotes
- Semantic Analysis - Error detection and semantic highlighting
- File Templates - Quick creation of new Phel files with proper structure
The plugin includes a comprehensive registry of 350+ Phel functions across all core namespaces:
phel\base64- Base64 encoding/decoding utilitiesphel\core- Core language functions (258+ functions)phel\debug- Debugging and tracing toolsphel\html- HTML generation helpersphel\http- HTTP request/response handlingphel\json- JSON encoding/decodingphel\mock- Testing and mocking utilitiesphel\repl- REPL-specific functionsphel\str- String manipulation functionsphel\test- Testing framework functions
- Create or open a
.phelfile - The plugin will automatically activate and provide syntax highlighting
- Start typing to see intelligent code completions
- Hover over any function to see detailed documentation
git clone [email protected]:phel-lang/phel-intellij-plugin.git
cd intellij-phel-support
./gradlew buildPlugin- Clone the repository
- Open in IntelliJ IDEA (Community or Ultimate)
- Import as Gradle project
- Run the plugin with Gradle → runIde task
Test your changes by running the plugin in a separate IDE instance:
./gradlew runIdesrc/
├── main/
│ ├── kotlin/org/phellang/ # Main plugin source (Kotlin)
│ │ ├── actions/ # Contextual menu actions
│ │ ├── annotator/ # Semantic highlighting
│ │ ├── completion/ # Code completion & documentation
│ │ └── ...
│ ├── gen/ # Generated parser code
│ └── resources/
│ └── META-INF/plugin.xml # Plugin configuration
└── test/kotlin/org/phellang/ # Test suite- PhelLexer (
.flex) - Tokenizes Phel source code into tokens - PhelParser (
.bnf) - Parses tokens into PSI (Program Structure Interface) tree - PhelFileType - Registers
.phelfile type with IntelliJ platform - PhelSyntaxHighlighter - Provides syntax coloring for keywords, strings, numbers, etc.
- PhelCompletionContributor - Intelligent code completion for functions and symbols
- PhelFunctionRegistry - Central registry of 350+ Phel functions with full documentation
- PhelDocumentationProvider - Hover documentation with examples and deprecation info
- PhelAnnotator - Semantic highlighting and error detection
- PhelFoldingBuilder - Code folding for functions and data structures
- PhelTypedHandler - Smart character insertion (auto-closing brackets, quotes)
- PhelBraceMatcher - Bracket matching and highlighting
- PhelCommenter - Comment/uncomment code blocks
Run the test suite:
./gradlew testBuild and verify:
./gradlew build- Phel Language: phel-lang.org
- Phel API Documentation: phel-lang.org/documentation/api/
- Plugin Page: JetBrains Marketplace
- GitHub Repository: github.com/phel-lang/intellij-phel-support
Contributions are welcome! Please feel free to submit issues and pull requests.