[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/php-mode a01bb220bf 09/15: Add php-ide-eglot-server-progra
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/php-mode a01bb220bf 09/15: Add php-ide-eglot-server-program command |
Date: |
Sat, 18 Mar 2023 18:01:27 -0400 (EDT) |
branch: elpa/php-mode
commit a01bb220bfa1bf3991dbc79d50ea49342d7a6833
Author: USAMI Kenta <tadsan@zonu.me>
Commit: USAMI Kenta <tadsan@zonu.me>
Add php-ide-eglot-server-program command
---
lisp/php-ide.el | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/lisp/php-ide.el b/lisp/php-ide.el
index c0bf2e6876..8d6cc758a6 100644
--- a/lisp/php-ide.el
+++ b/lisp/php-ide.el
@@ -84,10 +84,10 @@
;;
;;; Code:
+(require 'cl-lib)
(require 'php-project)
(eval-when-compile
- (require 'cl-lib)
(require 'php-ide-phpactor)
(defvar eglot-server-programs)
(declare-function lsp-bridge-mode "ext:lsp-bridge" ())
@@ -136,6 +136,31 @@
:safe (lambda (v) (cl-loop for feature in (if (listp v) v (list v))
always (symbolp feature))))
+;;;###autoload
+(defcustom php-ide-eglot-executable nil
+ "Command name or path to the command of Eglot LSP executable."
+ :tag "PHP-IDE Eglot Executable"
+ :group 'php-ide
+ :type '(choice
+ (const intelephense)
+ (const phpactor)
+ string (repeat string))
+ :safe (lambda (v) (cond
+ ((stringp v) (file-exists-p v))
+ ((listp v) (cl-every #'stringp v))
+ ((assq v php-ide-lsp-command-alist)))))
+
+;;;###autoload
+(defun php-ide-eglot-server-program ()
+ "Return a list of command to execute LSP Server."
+ (cond
+ ((stringp php-ide-eglot-executable) (list php-ide-eglot-executable))
+ ((listp php-ide-eglot-executable) php-ide-eglot-executable)
+ ((when-let (command (assq php-ide-eglot-executable
php-ide-lsp-command-alist))
+ (cond
+ ((functionp command) (funcall command))
+ ((listp command) command))))))
+
(defcustom php-ide-mode-lighter " PHP-IDE"
"A symbol of PHP-IDE feature."
:tag "PHP-IDE Mode Lighter"
- [nongnu] elpa/php-mode updated (8e874a8fd8 -> 47e0813079), ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode 657a7b803d 08/15: Update CHANGELOG, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode bb5bec31ee 04/15: Add php-ide.el, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode a01bb220bf 09/15: Add php-ide-eglot-server-program command,
ELPA Syncer <=
- [nongnu] elpa/php-mode 5d3e9462a2 01/15: Fix doc comment, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode 91cd91a107 07/15: Remove php-eglot.el, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode 67d818928a 02/15: Add php-ide-phpactor.el, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode e45fa0766f 05/15: Add lsp-bridge, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode acde9abad2 03/15: Add php-eglot.el, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode c601f75fb9 13/15: Merge pull request #734 from emacs-php/release/v1.24.3, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode 6d4ca45093 06/15: Add php-ide-mode-hooks, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode ece3dd51ce 10/15: Add php-ide-mode-functions instead of php-ide-mode-hooks, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode 2714393979 14/15: Make PHP Mode requires Emacs 26.1+, ELPA Syncer, 2023/03/18
- [nongnu] elpa/php-mode 47e0813079 15/15: Merge pull request #736 from emacs-php/drop/emacs-25, ELPA Syncer, 2023/03/18