unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add eglot-alternatives for PHP
@ 2022-11-11 16:54 USAMI Kenta
  2022-11-17  9:48 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: USAMI Kenta @ 2022-11-11 16:54 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

Hi all,

This patch adds two alternate servers that take precedence over 
php-language-server registered in eglot-server-programs.

php-language-server has been abandoned since 2018 and is obsolete.
https://github.com/felixfbecker/php-language-server

Phpactor is a free software language server implementation for PHP.
https://github.com/phpactor/phpactor

Intelephense is a proprietary one, but many PHP programmers already use it.
https://intelephense.com/

This patch is same as https://github.com/joaotavora/eglot/pull/1105
I have assigned the copyright to FSF.

Best regards,

[-- Attachment #2: 1105.patch --]
[-- Type: text/plain, Size: 1351 bytes --]

From e8fbe1dbd24d818569a72c671004501208f74a45 Mon Sep 17 00:00:00 2001
From: USAMI Kenta <zonuexe+tadsan@zonu.me>
Date: Fri, 11 Nov 2022 22:57:06 +0900
Subject: [PATCH] Add eglot-alternatives for PHP

---
 eglot.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 901bf30d..cdf54660 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -190,8 +190,10 @@ chosen (interactively or automatically)."
                                  . ("typescript-language-server" "--stdio"))
                                 (sh-mode . ("bash-language-server" "start"))
                                 ((php-mode phps-mode)
-                                 . ("php" "vendor/felixfbecker/\
-language-server/bin/php-language-server.php"))
+                                 . ,(eglot-alternatives
+                                     '(("phpactor" "language-server")
+                                       ("intelephense" "--stdio")
+                                       ("php" "vendor/felixfbecker/language-server/bin/php-language-server.php"))))
                                 ((c++-mode c-mode) . ,(eglot-alternatives
                                                        '("clangd" "ccls")))
                                 (((caml-mode :language-id "ocaml")

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add eglot-alternatives for PHP
  2022-11-11 16:54 [PATCH] Add eglot-alternatives for PHP USAMI Kenta
@ 2022-11-17  9:48 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2022-11-17  9:48 UTC (permalink / raw)
  To: USAMI Kenta; +Cc: emacs-devel

> From: USAMI Kenta <zonuexe@zonu.me>
> Date: Sat, 12 Nov 2022 01:54:01 +0900
> 
> This patch adds two alternate servers that take precedence over 
> php-language-server registered in eglot-server-programs.
> 
> php-language-server has been abandoned since 2018 and is obsolete.
> https://github.com/felixfbecker/php-language-server
> 
> Phpactor is a free software language server implementation for PHP.
> https://github.com/phpactor/phpactor
> 
> Intelephense is a proprietary one, but many PHP programmers already use it.
> https://intelephense.com/
> 
> This patch is same as https://github.com/joaotavora/eglot/pull/1105
> I have assigned the copyright to FSF.

Thanks.

We don't want to encourage users to install proprietary software, so I
installed this patch after removing Intelephense from it.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-17  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 16:54 [PATCH] Add eglot-alternatives for PHP USAMI Kenta
2022-11-17  9:48 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).