unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: USAMI Kenta <zonuexe@zonu.me>
To: emacs-devel@gnu.org
Subject: [PATCH] Add eglot-alternatives for PHP
Date: Sat, 12 Nov 2022 01:54:01 +0900	[thread overview]
Message-ID: <f3c1d5b7-cc0a-5489-254d-b58777066ac4@zonu.me> (raw)

[-- 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")

             reply	other threads:[~2022-11-11 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 16:54 USAMI Kenta [this message]
2022-11-17  9:48 ` [PATCH] Add eglot-alternatives for PHP Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f3c1d5b7-cc0a-5489-254d-b58777066ac4@zonu.me \
    --to=zonuexe@zonu.me \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).