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