From: João Távora Date: Tue, 15 May 2018 12:24:08 +0000 (+0100) Subject: Add php's php-language-server to built-in guessed servers X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~567 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=40e256a1bf6d237eb5637fd726077332519338a6;p=emacs.git Add php's php-language-server to built-in guessed servers 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. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 4ff6204fc39..da3a09f3b22 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -71,7 +71,9 @@ (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 @@ -276,6 +278,7 @@ INTERACTIVE is t if inside interactive call." 'network) (emacs-pid)) :capabilities(eglot--client-capabilities) + :rootPath (car (project-roots project)) :rootUri (eglot--path-to-uri (car (project-roots project))) :initializationOptions []))