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 project symbols
- Documentation Popups - Hover over functions to see detailed documentation with examples
- Code Inspections - Deprecated-function, backslash-namespace, arity-mismatch, unused-let-binding, and shadowed-let-binding checks with quick-fixes
- Parameter Hints - Inlay hints showing parameter names at call sites
- Structure View - Outline of top-level definitions for quick navigation
- Rename Refactoring - Safe rename for symbols across a file
- Bracket Matching - Automatic matching and highlighting of parentheses, brackets, and braces
- Code Folding - Collapse/expand code blocks for better navigation
- Smart Typing & Paredit - Auto-completion of brackets/quotes and structural editing
- Code Formatting - Format Phel sources via the external
phelformatter - Semantic Analysis - Error detection and semantic highlighting
- File Templates - Quick creation of new Phel files with proper structure
The plugin ships a generated registry of 900+ Phel functions across 35 namespaces (kept in
sync with the official API via ./gradlew updatePhelRegistry), including:
phel\core- Core language functionsphel\string- String manipulation functionsphel\json,phel\edn,phel\base64,phel\transit- Encoding/decoding utilitiesphel\http,phel\http-client,phel\router- HTTP and routing helpersphel\html- HTML generation helpersphel\test,phel\test-gen,phel\mock- Testing and property-based testing utilitiesphel\schema(and validator/coercer/generator variants) - Data schema toolingphel\debug,phel\reflect,phel\repl- Debugging, reflection, and REPL helpers
- 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 git@github.com: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 900+ 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.