💾 Archived View for g.codelearn.me › 2022-10-24-eglot_php.gmi captured on 2024-08-25 at 00:16:30. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-03-20)
-=-=-=-=-=-=-
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
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.