PHP
Install
Intelephense is the most popular PHP language server.
macOS
npm install -g intelephense
Linux
npm install -g intelephense
Windows
npm install -g intelephense
Config
Catenary ships a built-in definition for intelephense — no
[lsp.server.*] config is needed. If intelephense is on PATH, it works
automatically.
Notes
- Intelephense has a free tier and a premium tier with additional features
- The free tier includes: completions, hover, definitions, references, diagnostics, formatting
- Premium adds: rename, code actions, go to implementation
- Works great with Laravel, Symfony, WordPress, and vanilla PHP
Alternatives
phpactor
A free, open-source alternative:
# Install via composer
composer global require phpactor/phpactor
[lsp.server.phpactor]
args = ["language-server"]
[lsp.language.php]
servers = ["phpactor"]