VS Code support for Phel, a functional Lisp that compiles to PHP.
- Highlighting for forms, macros, reader macros, tagged literals, and reader conditionals.
- Language server (
phel lsp, opt-in viaphel.lsp.enabled): completion, hover, signature help, go-to-definition, find references, rename, symbols, formatting, and diagnostics straight from the Phel compiler — including PHP-interop intelligence forphp/->,php/::, andphp/new. Off by default; enable it once your Phel ships a stable server (olderphel lspbuilds exit on idle, in which case the extension falls back to its bundled providers). - Go to / Find / Rename (
F12,shift+F12,F2,cmd+T). - Diagnostics and format on save.
- REPL in an integrated terminal with
(in-ns)follow and history. - nREPL client (
phel nrepl): structured eval results, reload changed namespaces, and run a namespace's tests or the test under the cursor against the live runtime. - Test Explorer + CodeLens for
deftest, with per-test results and a Run with Coverage profile (phel test --coverage=clover, VS Code 1.88+). - Paredit: slurp / barf / raise / wrap, sexp selection.
- Native debug adapter with breakpoints in
.phelfiles. - CLI commands: Doctor (
phel doctor), Show Effective Configuration (phel config), Watch Tests, Build, and Init Project (with a template picker). - Snippets for
defn,let,cond,try,deftest,->, …
Marketplace: https://marketplace.visualstudio.com/items?itemName=Phel-Lang.phel-lang
Open Extensions (Cmd+Shift+X), search "Phel Lang", click Install. Or:
code --install-extension Phel-Lang.phel-langRequires VS Code 1.88+.
The extension expects the Phel CLI at vendor/bin/phel (Composer default). For other layouts, set phel.executablePath once in .vscode/settings.json:
Per-subsystem overrides (phel.diagnostics.command, phel.format.command, phel.test.command, phel.repl.command) take precedence when set. Full settings reference: docs/settings.md.
| Topic | Link |
|---|---|
| Installation paths | docs/installation.md |
| Syntax highlighting | docs/syntax.md |
| Completion & snippets | docs/completion.md |
| REPL & paredit | docs/repl-and-paredit.md |
| Refactoring | docs/refactoring.md |
| Debugging with Xdebug | docs/debugging.md |
Tracing with tap> |
docs/taps.md |
| Settings | docs/settings.md |
| Troubleshooting | docs/troubleshooting.md |
{ "phel.executablePath": "bin/phel" }