@@ -460,25 +460,11 @@ The MARKERS and PREFIX value will be attached to each candidate."
460
460
(defun lsp-completion--get-documentation (item )
461
461
" Get doc comment for completion ITEM."
462
462
(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?
470
464
: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?)
482
468
; ; detail was resolved, that means the candidate list has no
483
469
; ; detail, so we may need to prepend it to the documentation
484
470
(cond ((lsp-markup-content? documentation?)
@@ -514,8 +500,8 @@ The MARKERS and PREFIX value will be attached to each candidate."
514
500
515
501
(lsp--render-element documentation?) )))
516
502
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)))
519
505
520
506
(defun lsp-completion--get-context (trigger-characters same-session? )
521
507
" Get completion context with provided TRIGGER-CHARACTERS and SAME-SESSION?."
0 commit comments