@@ -460,25 +460,11 @@ The MARKERS and PREFIX value will be attached to each candidate."
460460(defun lsp-completion--get-documentation (item )
461461 " Get doc comment for completion ITEM."
462462 (or (get-text-property 0 'lsp-completion-item-doc item)
463- (-let* ((unresolved-item (get-text-property 0 'lsp-completion-unresolved-item item))
464- (has-unresolved-detail (lsp:completion-item-detail? unresolved-item))
465- (resolved (get-text-property 0 'lsp-completion-resolved item))
466- (completion-item (if resolved
467- (get-text-property 0 'lsp-completion-item item)
468- unresolved-item))
469- ((&CompletionItem :detail?
463+ (-let* (((&CompletionItem :detail?
470464 :documentation? )
471- completion-item))
472-
473- (unless (or resolved (and detail? documentation?) )
474- (setq completion-item (get-text-property 0 'lsp-completion-item (lsp-completion-resolve item))
475- resolved t ))
476-
477- (setq detail? (lsp:completion-item-detail? completion-item)
478- documentation? (lsp:completion-item-documentation? completion-item))
479-
480- (let ((doc
481- (if (and (null has-unresolved-detail) detail? documentation?)
465+ (get-text-property 0 'lsp-completion-item (lsp-completion-resolve item)))
466+ (doc
467+ (if (and detail? documentation?)
482468 ; ; detail was resolved, that means the candidate list has no
483469 ; ; detail, so we may need to prepend it to the documentation
484470 (cond ((lsp-markup-content? documentation?)
@@ -514,8 +500,8 @@ The MARKERS and PREFIX value will be attached to each candidate."
514500
515501 (lsp--render-element documentation?) )))
516502
517- (put-text-property 0 (length item) 'lsp-completion-item-doc doc item)
518- doc) )))
503+ (put-text-property 0 (length item) 'lsp-completion-item-doc doc item)
504+ doc)))
519505
520506(defun lsp-completion--get-context (trigger-characters same-session? )
521507 " Get completion context with provided TRIGGER-CHARACTERS and SAME-SESSION?."
0 commit comments