Eglot & PHP & Phpactor

Trying out eglot at the moment on a php project I have and unfortunately it doesn't work out of the box.

The issue is that my PHP project is based on PHP8 and

=> php-language-server

is pretty old server that doesn't support new php versions.

There are bunch of other LSPs for PHP and I would like to play with Phpactor which I never used before.

Fortunately eglot supports any LSP server and Phpactor has one too.

To make it work just add this to your init.el:

(add-to-list 'eglot-server-programs '((php-mode phps-mode) "phpactor" "language-server"))

Make sure phpactor is in your $PATH, otherwise just specify the full path.

Now you can just M-x eglot in any php file and it should magically start working.

Proxy Information
Original URL
gemini://g.codelearn.me/2022-10-24-eglot_php.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
529.006293 milliseconds
Gemini-to-HTML Time
0.276002 milliseconds

This content has been proxied by September (3851b).