@@ -187,7 +187,7 @@ See #2675"
187
187
(unless (lsp-get data :import_for_trait_assoc_item )
188
188
(lsp-put data :import_for_trait_assoc_item :json-false )))))
189
189
190
- (defun lsp-completion-- resolve (item )
190
+ (defun lsp-completion-resolve (item )
191
191
" Resolve completion ITEM.
192
192
ITEM can be string or a CompletionItem"
193
193
(cl-assert item nil " Completion item must not be nil" )
@@ -212,7 +212,9 @@ ITEM can be string or a CompletionItem"
212
212
item))
213
213
(_ completion-item)))))
214
214
215
- (defun lsp-completion--resolve-async (item callback &optional cleanup-fn )
215
+ (defalias 'lsp-completion--resolve 'lsp-completion-resolve )
216
+
217
+ (defun lsp-completion-resolve-async (item callback &optional cleanup-fn )
216
218
" Resolve completion ITEM asynchronously with CALLBACK.
217
219
The CLEANUP-FN will be called to cleanup."
218
220
(cl-assert item nil " Completion item must not be nil" )
@@ -243,6 +245,8 @@ The CLEANUP-FN will be called to cleanup."
243
245
(funcall callback completion-item)
244
246
(when cleanup-fn (funcall cleanup-fn))))))
245
247
248
+ (defalias 'lsp-completion--resolve-async 'lsp-completion-resolve-async )
249
+
246
250
(defun lsp-completion--annotate (item )
247
251
" Annotate ITEM detail."
248
252
(-let (((completion-item &as &CompletionItem :detail? :kind? :label-details? )
@@ -467,7 +471,7 @@ The MARKERS and PREFIX value will be attached to each candidate."
467
471
completion-item))
468
472
469
473
(unless (or resolved (and detail? documentation?) )
470
- (setq completion-item (get-text-property 0 'lsp-completion-item (lsp-completion-- resolve item))
474
+ (setq completion-item (get-text-property 0 'lsp-completion-item (lsp-completion-resolve item))
471
475
resolved t ))
472
476
473
477
(setq detail? (lsp:completion-item-detail? completion-item)
@@ -672,7 +676,7 @@ Others: CANDIDATES"
672
676
; ; see #3498 typescript-language-server does not provide the
673
677
; ; proper insertText without resolving.
674
678
(if (lsp-completion--find-workspace 'ts-ls )
675
- (lsp-completion-- resolve candidate)
679
+ (lsp-completion-resolve candidate)
676
680
candidate))
677
681
((&plist 'lsp-completion-item item
678
682
'lsp-completion-start-point start-point
@@ -714,14 +718,14 @@ Others: CANDIDATES"
714
718
(not (seq-empty-p additional-text-edits?) ))
715
719
(lsp--apply-text-edits additional-text-edits? 'completion )
716
720
(-let [(callback cleanup-fn) (lsp--create-apply-text-edits-handlers)]
717
- (lsp-completion-- resolve-async
721
+ (lsp-completion-resolve-async
718
722
item
719
723
(-compose callback #'lsp:completion-item-additional-text-edits? )
720
724
cleanup-fn))))
721
725
722
726
(if (or resolved command?)
723
727
(when command? (lsp--execute-command command?) )
724
- (lsp-completion-- resolve-async
728
+ (lsp-completion-resolve-async
725
729
item
726
730
(-lambda ((&CompletionItem? :command? ))
727
731
(when command? (lsp--execute-command command?) ))))
0 commit comments