From bc5a8ec3fa67c888a7c61b244a7321fce9be25eb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 28 Jul 2024 15:18:06 -0400 Subject: [PATCH] fix(zig): update zls download URL sooner By putting it in zig-mode's :config block, the new URL won't be available until the zig-mode package is loaded, which means users who try to install zls with M-x lsp-install-server *before* zig-mode is loaded will get the old, broken URL instead of the new. Fix: #7970 Amend: 7bb5df4cd4ae --- modules/tools/lsp/+lsp.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 8ea2eda5e..59c05a02c 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -43,6 +43,11 @@ Can be a list of backends; accepts any value `company-backends' accepts.") (when (modulep! :config default +bindings) (setq lsp-keymap-prefix nil)) + ;; REVIEW: Remove when zigtools/zls#1879 is resolved. + (after! lsp-zig + (unless (featurep :system 'windows) + (setq lsp-zig-download-url-format "https://github.com/zigtools/zls/releases/latest/download/zls-%s-%s.tar.xz"))) + :config (add-to-list 'doom-debug-variables 'lsp-log-io) @@ -54,10 +59,6 @@ Can be a list of backends; accepts any value `company-backends' accepts.") lsp-xml-jar-file (expand-file-name "org.eclipse.lsp4xml-0.3.0-uber.jar" lsp-server-install-dir) lsp-groovy-server-file (expand-file-name "groovy-language-server-all.jar" lsp-server-install-dir)) - ;; REVIEW: Remove when zigtools/zls#1879 is resolved. - (unless (featurep :system 'windows) - (setq lsp-zig-download-url-format "https://github.com/zigtools/zls/releases/latest/download/zls-%s-%s.tar.xz")) - (add-hook! 'doom-escape-hook (defun +lsp-signature-stop-maybe-h () "Close the displayed `lsp-signature'."