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: 7bb5df4cd4
This commit is contained in:
Henrik Lissner 2024-07-28 15:18:06 -04:00
parent bc948c38c2
commit bc5a8ec3fa
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -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'."