@@ -190,7 +190,7 @@ See #2675"
190190 (unless (lsp-get data :for_ref )
191191 (lsp-put data :for_ref :json-false )))))
192192
193- (defun lsp-completion-- resolve (item )
193+ (defun lsp-completion-resolve (item )
194194 " Resolve completion ITEM.
195195ITEM can be string or a CompletionItem"
196196 (cl-assert item nil " Completion item must not be nil" )
@@ -215,7 +215,9 @@ ITEM can be string or a CompletionItem"
215215 item))
216216 (_ completion-item)))))
217217
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 )
219221 " Resolve completion ITEM asynchronously with CALLBACK.
220222The CLEANUP-FN will be called to cleanup."
221223 (cl-assert item nil " Completion item must not be nil" )
@@ -246,6 +248,8 @@ The CLEANUP-FN will be called to cleanup."
246248 (funcall callback completion-item)
247249 (when cleanup-fn (funcall cleanup-fn))))))
248250
251+ (defalias 'lsp-completion--resolve-async 'lsp-completion-resolve-async )
252+
249253(defun lsp-completion--annotate (item )
250254 " Annotate ITEM detail."
251255 (-let (((completion-item &as &CompletionItem :detail? :kind? :label-details? )
@@ -470,7 +474,7 @@ The MARKERS and PREFIX value will be attached to each candidate."
470474 completion-item))
471475
472476 (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))
474478 resolved t ))
475479
476480 (setq detail? (lsp:completion-item-detail? completion-item)
@@ -675,7 +679,7 @@ Others: CANDIDATES"
675679 ; ; see #3498 typescript-language-server does not provide the
676680 ; ; proper insertText without resolving.
677681 (if (lsp-completion--find-workspace 'ts-ls )
678- (lsp-completion-- resolve candidate)
682+ (lsp-completion-resolve candidate)
679683 candidate))
680684 ((&plist 'lsp-completion-item item
681685 'lsp-completion-start-point start-point
@@ -717,14 +721,14 @@ Others: CANDIDATES"
717721 (not (seq-empty-p additional-text-edits?) ))
718722 (lsp--apply-text-edits additional-text-edits? 'completion )
719723 (-let [(callback cleanup-fn) (lsp--create-apply-text-edits-handlers)]
720- (lsp-completion-- resolve-async
724+ (lsp-completion-resolve-async
721725 item
722726 (-compose callback #'lsp:completion-item-additional-text-edits? )
723727 cleanup-fn))))
724728
725729 (if (or resolved command?)
726730 (when command? (lsp--execute-command command?) )
727- (lsp-completion-- resolve-async
731+ (lsp-completion-resolve-async
728732 item
729733 (-lambda ((&CompletionItem? :command? ))
730734 (when command? (lsp--execute-command command?) ))))
0 commit comments