Skip to content

PHPantom ​

PHPantom is the PHP language server Porta suggests: completion, diagnostics, navigation and refactoring for PHP, from one native binary. The Welcome screen sets it up in one keystroke; otherwise enable it under Settings → Plugins → phpantom.

The phpantom page in Settings → Plugins

The plugin runs phpantom_lsp from its phpantom_lsp binary setting when you set one, otherwise from your PATH. While neither resolves, PHP is simply left unserved and the plugin's settings page offers to install it — through Homebrew (brew install phpantom-lsp) or cargo (cargo install phpantom_lsp --locked). How Porta picks between language servers is in Getting started.

The same binary is a fixer, too:

  • PHPantom: Fix Current File (Ctrl+Alt+M) fixes the active file and applies the result to the buffer, one Ctrl+Z away.
  • PHPantom: Fix Project fixes every file, leaving them to reload from disk.
  • PHPantom: Generate Config writes a starter configuration (phpantom_lsp init).

Settings ​

SettingDefaultWhat it does
phpantom_lsp binaryemptyThe executable to run; empty finds it on the PATH
Fix on saveoffFix each PHP file when you save it (PHPantom: Toggle Fix on Save)

Keys ​

KeyAction
Ctrl+Alt+MFix the current file

Released under the MIT License.