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