mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-17 03:10:58 -08:00
Eglot: more leniently handle 'window/showMessageRequest'
Some servers mess up this message's arguments. * lisp/progmodes/eglot.el (eglot-handle-request): Fix.
This commit is contained in:
parent
b19d040a4f
commit
f20fe3e11a
1 changed files with 3 additions and 2 deletions
|
|
@ -2136,13 +2136,14 @@ COMMAND is a symbol naming the command."
|
|||
type message))
|
||||
|
||||
(cl-defmethod eglot-handle-request
|
||||
(_server (_method (eql window/showMessageRequest)) &key type message actions)
|
||||
(_server (_method (eql window/showMessageRequest))
|
||||
&key type message actions &allow-other-keys)
|
||||
"Handle server request window/showMessageRequest."
|
||||
(let* ((actions (append actions nil)) ;; gh#627
|
||||
(label (completing-read
|
||||
(concat
|
||||
(format (propertize "[eglot] Server reports (type=%s): %s"
|
||||
'face (if (<= type 1) 'error))
|
||||
'face (if (or (not type) (<= type 1)) 'error))
|
||||
type message)
|
||||
"\nChoose an option: ")
|
||||
(or (mapcar (lambda (obj) (plist-get obj :title)) actions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue