From: João Távora Date: Fri, 1 Jun 2018 16:52:00 +0000 (+0100) Subject: Fix completionitem/resolve X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~518 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7b040d4d1866b2be31ca4809b1bbb341921c8f73;p=emacs.git Fix completionitem/resolve Should fix interoperation with company-quickhelp. * eglot.el (eglot-completion-at-point): Correctly pass properties to completionItem/resolve. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b133ffbbb20..3c842976344 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1372,7 +1372,9 @@ DUMMY is ignored" (mapcar (eglot--lambda (&rest all &key label insertText &allow-other-keys) (let ((insert (or insertText label))) - (add-text-properties 0 1 all insert) insert)) + (add-text-properties 0 1 all insert) + (put-text-property 0 1 'eglot--lsp-completion all insert) + insert)) items)))) :annotation-function (lambda (obj) @@ -1391,13 +1393,15 @@ DUMMY is ignored" (or (get-text-property 0 :sortText b) ""))))) :company-doc-buffer (lambda (obj) - (let ((documentation - (or (get-text-property 0 :documentation obj) - (and (eglot--server-capable :completionProvider - :resolveProvider) - (plist-get (eglot--request server :completionItem/resolve - (text-properties-at 0 obj)) - :documentation))))) + (let* ((documentation + (or (get-text-property 0 :documentation obj) + (and (eglot--server-capable :completionProvider + :resolveProvider) + (plist-get + (eglot--request server :completionItem/resolve + (get-text-property + 0 'eglot--lsp-completion obj)) + :documentation))))) (when documentation (with-current-buffer (get-buffer-create " *eglot doc*") (insert (eglot--format-markup documentation))