Skip to content

Commit c72056b

Browse files
authored
fix: Ensure start up after installation (#4379)
1 parent 9e5a15c commit c72056b

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

clients/lsp-actionscript.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,14 @@ See https://github.com/BowlerHatLLC/vscode-as3mxml/wiki/Choose-an-ActionScript-S
119119
:major-modes '(actionscript-mode)
120120
:priority -1
121121
:server-id 'as3mxml-ls
122-
:download-server-fn (lambda (_client _callback error-callback _update?)
122+
:download-server-fn (lambda (_client callback error-callback _update?)
123123
(lsp-package-ensure
124124
'as3mxml
125125
(lambda ()
126126
;; TODO: Error handling when unzip failed
127127
(lsp-unzip (lsp-actionscript--extension-path-zip)
128-
(lsp-actionscript--extension-root)))
128+
(lsp-actionscript--extension-root))
129+
(funcall callback))
129130
error-callback))))
130131

131132
(lsp-consistency-check lsp-actionscript)

clients/lsp-zig.el

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ This is differ from the variable `lsp-zig-zls-executable'; this is local storage
270270
and not the global storage."
271271
(executable-find (f-join lsp-zig-server-store-path "bin/zls")))
272272

273-
(defun lsp-zig--extract-compressed-file ()
273+
(defun lsp-zig--extract-compressed-file (callback)
274274
"Install zls."
275275
(cond ((file-exists-p lsp-zig--downloaded-file)
276276
;; Suprisingly, you can just use `tar' to unzip a zip file on Windows.
@@ -279,7 +279,8 @@ and not the global storage."
279279
;; Delete the zip file.
280280
(ignore-errors (delete-file lsp-zig--downloaded-file)))
281281
(t
282-
(error "Can't extract the downloaded file: %s" lsp-zig--downloaded-file))))
282+
(error "Can't extract the downloaded file: %s" lsp-zig--downloaded-file)))
283+
(funcall callback))
283284

284285
(lsp-dependency
285286
'zls
@@ -332,8 +333,11 @@ and not the global storage."
332333
:priority -1
333334
:server-id 'zls
334335
:download-server-fn
335-
(lambda (_client _callback error-callback _update?)
336-
(lsp-package-ensure 'zls #'lsp-zig--extract-compressed-file error-callback))))
336+
(lambda (_client callback error-callback _update?)
337+
(lsp-package-ensure 'zls
338+
(lambda (&rest _)
339+
(lsp-zig--extract-compressed-file callback))
340+
error-callback))))
337341

338342
(lsp-consistency-check lsp-zig)
339343

0 commit comments

Comments
 (0)