@@ -463,25 +463,11 @@ The MARKERS and PREFIX value will be attached to each candidate."
463
463
(defun lsp-completion--get-documentation (item )
464
464
" Get doc comment for completion ITEM."
465
465
(or (get-text-property 0 'lsp-completion-item-doc item)
466
- (-let* ((unresolved-item (get-text-property 0 'lsp-completion-unresolved-item item))
467
- (has-unresolved-detail (lsp:completion-item-detail? unresolved-item))
468
- (resolved (get-text-property 0 'lsp-completion-resolved item))
469
- (completion-item (if resolved
470
- (get-text-property 0 'lsp-completion-item item)
471
- unresolved-item))
472
- ((&CompletionItem :detail?
466
+ (-let* (((&CompletionItem :detail?
473
467
:documentation? )
474
- completion-item))
475
-
476
- (unless (or resolved (and detail? documentation?) )
477
- (setq completion-item (get-text-property 0 'lsp-completion-item (lsp-completion-resolve item))
478
- resolved t ))
479
-
480
- (setq detail? (lsp:completion-item-detail? completion-item)
481
- documentation? (lsp:completion-item-documentation? completion-item))
482
-
483
- (let ((doc
484
- (if (and (null has-unresolved-detail) detail? documentation?)
468
+ (get-text-property 0 'lsp-completion-item (lsp-completion-resolve item)))
469
+ (doc
470
+ (if (and detail? documentation?)
485
471
; ; detail was resolved, that means the candidate list has no
486
472
; ; detail, so we may need to prepend it to the documentation
487
473
(cond ((lsp-markup-content? documentation?)
@@ -517,8 +503,8 @@ The MARKERS and PREFIX value will be attached to each candidate."
517
503
518
504
(lsp--render-element documentation?) )))
519
505
520
- (put-text-property 0 (length item) 'lsp-completion-item-doc doc item)
521
- doc) )))
506
+ (put-text-property 0 (length item) 'lsp-completion-item-doc doc item)
507
+ doc)))
522
508
523
509
(defun lsp-completion--get-context (trigger-characters same-session? )
524
510
" Get completion context with provided TRIGGER-CHARACTERS and SAME-SESSION?."
0 commit comments