From f08afeb98ecf6ef9d7cd57e2190f16c1e66b74b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Tue, 15 May 2018 13:24:08 +0100 Subject: [PATCH] Add PHP's php-language-server to built-in guessed servers Closes #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. #1: https://github.com/joaotavora/eglot/issues/1 --- lisp/progmodes/eglot.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 4ff6204fc3..da3a09f3b2 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 []))