See also https://github.com/joaotavora/eglot/issues/386.
* eglot.el (eglot-code-actions): Replace tmm with completing-read
Copyright-paperwork-exempt: yes
Co-authored-by: João Távora <joaotavora@gmail.com>
GitHub-reference: close https://github.com/joaotavora/eglot/issues/393
(menu `("Eglot code actions:" ("dummy" ,@menu-items)))
(action (if (listp last-nonmenu-event)
(x-popup-menu last-nonmenu-event menu)
- (let ((never-mind (gensym)) retval)
- (setcdr (cadr menu)
- (cons `("never mind..." . ,never-mind) (cdadr menu)))
- (if (eq (setq retval (tmm-prompt menu)) never-mind)
- (keyboard-quit)
- retval)))))
+ (cdr (assoc (completing-read "[eglot] Pick an action: "
+ menu-items nil t
+ nil nil (car menu-items))
+ menu-items)))))
(eglot--dcase action
(((Command) command arguments)
(eglot-execute-command server (intern command) arguments))