File tree 1 file changed +26
-1
lines changed
1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 84
84
; ;
85
85
86
86
; ;; Code:
87
+ (require 'cl-lib )
87
88
(require 'php-project )
88
89
89
90
(eval-when-compile
90
- (require 'cl-lib )
91
91
(require 'php-ide-phpactor )
92
92
(defvar eglot-server-programs )
93
93
(declare-function lsp-bridge-mode " ext:lsp-bridge" ())
136
136
:safe (lambda (v ) (cl-loop for feature in (if (listp v) v (list v))
137
137
always (symbolp feature))))
138
138
139
+ ;;;### autoload
140
+ (defcustom php-ide-eglot-executable nil
141
+ " Command name or path to the command of Eglot LSP executable."
142
+ :tag " PHP-IDE Eglot Executable"
143
+ :group 'php-ide
144
+ :type '(choice
145
+ (const intelephense)
146
+ (const phpactor)
147
+ string (repeat string))
148
+ :safe (lambda (v ) (cond
149
+ ((stringp v) (file-exists-p v))
150
+ ((listp v) (cl-every #'stringp v))
151
+ ((assq v php-ide-lsp-command-alist)))))
152
+
153
+ ;;;### autoload
154
+ (defun php-ide-eglot-server-program ()
155
+ " Return a list of command to execute LSP Server."
156
+ (cond
157
+ ((stringp php-ide-eglot-executable) (list php-ide-eglot-executable))
158
+ ((listp php-ide-eglot-executable) php-ide-eglot-executable)
159
+ ((when-let (command (assq php-ide-eglot-executable php-ide-lsp-command-alist))
160
+ (cond
161
+ ((functionp command) (funcall command))
162
+ ((listp command) command))))))
163
+
139
164
(defcustom php-ide-mode-lighter " PHP-IDE"
140
165
" A symbol of PHP-IDE feature."
141
166
:tag " PHP-IDE Mode Lighter"
You can’t perform that action at this time.
0 commit comments