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