Skip to content

Commit 66739e5

Browse files
authored
fix: add pwsh support for zip decompression, zls wrong bin path (#4569)
* fix: add pwsh support and lsp-zig wrong path * fix typos
1 parent 52de586 commit 66739e5

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
longer generated. *This is a breaking change.* (See #4430.)
2020
* If asm-lsp is installed, lsp-asm won't try to download it to cache store
2121
* Fix lsp-unzip on windows when unzip was found on the PATH
22+
* Fix zls wrong bin path
2223

2324
** 9.0.0
2425
* Add language server config for QML (Qt Modeling Language) using qmlls.

clients/lsp-zig.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ If `true', replace the text after the cursor."
236236
This is differ from the variable `lsp-zig-zls-executable'; this is local storage
237237
and not the global storage."
238238
(f-join lsp-zig-server-store-path
239-
(pcase system-type ('windows-nt "bin/zls.exe") (_ "bin/zls"))))
239+
(pcase system-type ('windows-nt "zls.exe") (_ "zls"))))
240240

241241
(lsp-dependency
242242
'zls

lsp-mode.el

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8450,7 +8450,11 @@ archive (e.g. when the archive has multiple files)"
84508450

84518451
;; unzip
84528452

8453-
(defconst lsp-ext-pwsh-script "powershell -noprofile -noninteractive \
8453+
(defconst lsp-ext-pwsh-script "pwsh -noprofile -noninteractive \
8454+
-nologo -ex bypass -c Expand-Archive -Path '%s' -DestinationPath '%s'"
8455+
"Pwsh script to unzip file.")
8456+
8457+
(defconst lsp-ext-powershell-script "powershell -noprofile -noninteractive \
84548458
-nologo -ex bypass -command Expand-Archive -path '%s' -dest '%s'"
84558459
"Powershell script to unzip file.")
84568460

@@ -8459,10 +8463,13 @@ archive (e.g. when the archive has multiple files)"
84598463

84608464
(defcustom lsp-unzip-script (lambda ()
84618465
(cond ((and (eq system-type 'windows-nt)
8462-
(executable-find "powershell"))
8466+
(executable-find "pwsh"))
84638467
lsp-ext-pwsh-script)
8468+
((and (eq system-type 'windows-nt)
8469+
(executable-find "powershell"))
8470+
lsp-ext-powershell-script)
84648471
((executable-find "unzip") lsp-ext-unzip-script)
8465-
((executable-find "powershell") lsp-ext-pwsh-script)
8472+
((executable-find "pwsh") lsp-ext-pwsh-script)
84668473
(t nil)))
84678474
"The script to unzip."
84688475
:group 'lsp-mode

0 commit comments

Comments
 (0)