Closes https://github.com/joaotavora/eglot/issues/1. The problem in that issue is that php-language-server has a
bug when it's not passed it the deprecated ":rootPath" field. The bug
doesn't happen if the ":processId" field is also absent. Eglot was
triggering the bug, because it didn't pass ":rootPath", but there's
nothing wrong in doing so.
* README.md: Add php-language-server to the built-in list.
* eglot.el (eglot-server-programs): Add php-language-server.
(eglot--connect): Also pass (deprecated) rootPath.
(defvar eglot-server-programs '((rust-mode . ("rls"))
(python-mode . ("pyls"))
(js-mode . ("javascript-typescript-stdio"))
- (sh-mode . ("bash-language-server" "start")))
+ (sh-mode . ("bash-language-server" "start"))
+ (php-mode . ("php" "vendor/felixfbecker/\
+language-server/bin/php-language-server.php")))
"Alist mapping major modes to server executables.")
(defface eglot-mode-line
'network)
(emacs-pid))
:capabilities(eglot--client-capabilities)
+ :rootPath (car (project-roots project))
:rootUri (eglot--path-to-uri
(car (project-roots project)))
:initializationOptions []))