From 1b2b3295523ed982174bac431ac5d0cf397faa1b Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Mon, 30 Sep 2024 21:13:18 +0800 Subject: [PATCH 1/2] fix: add pwsh support and lsp-zig wrong path --- CHANGELOG.org | 1 + clients/lsp-zig.el | 2 +- lsp-mode.el | 11 +++++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index d3a464bdd0..0eeb5c9667 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -19,6 +19,7 @@ longer generated. *This is a breaking change.* (See #4430.) * If asm-lsp is installed, lsp-asm won't try to download it to cache store * Fix lsp-unzip on windows when unzip was found on the PATH + * Fix zlg wrong bin path ** 9.0.0 * Add language server config for QML (Qt Modeling Language) using qmlls. diff --git a/clients/lsp-zig.el b/clients/lsp-zig.el index ddf9d7b7bd..752143836a 100644 --- a/clients/lsp-zig.el +++ b/clients/lsp-zig.el @@ -236,7 +236,7 @@ If `true', replace the text after the cursor." This is differ from the variable `lsp-zig-zls-executable'; this is local storage and not the global storage." (f-join lsp-zig-server-store-path - (pcase system-type ('windows-nt "bin/zls.exe") (_ "bin/zls")))) + (pcase system-type ('windows-nt "zls.exe") (_ "zls")))) (lsp-dependency 'zls diff --git a/lsp-mode.el b/lsp-mode.el index 2266d9b240..7ade6c2272 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -8450,7 +8450,11 @@ archive (e.g. when the archive has multiple files)" ;; unzip -(defconst lsp-ext-pwsh-script "powershell -noprofile -noninteractive \ +(defconst lsp-ext-pwsh-script "pwsh -noprofile -noninteractive \ +-nologo -ex bypass -c Expand-Archive -Path '%s' -DestinationPath '%s'" + "Pwsh script to unzip file.") + +(defconst lsp-ext-powershell-script "powershell -noprofile -noninteractive \ -nologo -ex bypass -command Expand-Archive -path '%s' -dest '%s'" "Powershell script to unzip file.") @@ -8459,8 +8463,11 @@ archive (e.g. when the archive has multiple files)" (defcustom lsp-unzip-script (lambda () (cond ((and (eq system-type 'windows-nt) - (executable-find "powershell")) + (executable-find "pwsh")) lsp-ext-pwsh-script) + ((and (eq system-type 'windows-nt) + (executable-find "powershell")) + lsp-ext-powershell-script) ((executable-find "unzip") lsp-ext-unzip-script) ((executable-find "powershell") lsp-ext-pwsh-script) (t nil))) From 839039ed603c4631d5913a5e9ea062dfd8ff1056 Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Tue, 1 Oct 2024 08:46:19 +0800 Subject: [PATCH 2/2] fix typos --- CHANGELOG.org | 2 +- lsp-mode.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 0eeb5c9667..edaba88343 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -19,7 +19,7 @@ longer generated. *This is a breaking change.* (See #4430.) * If asm-lsp is installed, lsp-asm won't try to download it to cache store * Fix lsp-unzip on windows when unzip was found on the PATH - * Fix zlg wrong bin path + * Fix zls wrong bin path ** 9.0.0 * Add language server config for QML (Qt Modeling Language) using qmlls. diff --git a/lsp-mode.el b/lsp-mode.el index 7ade6c2272..7a9928f4eb 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -8469,7 +8469,7 @@ archive (e.g. when the archive has multiple files)" (executable-find "powershell")) lsp-ext-powershell-script) ((executable-find "unzip") lsp-ext-unzip-script) - ((executable-find "powershell") lsp-ext-pwsh-script) + ((executable-find "pwsh") lsp-ext-pwsh-script) (t nil))) "The script to unzip." :group 'lsp-mode