dev: merge branch 'master'

This commit is contained in:
Matt Nish-Lapidus 2024-07-30 10:29:35 -04:00
commit c6e7dff916
10 changed files with 84 additions and 21 deletions

View file

@ -43,10 +43,20 @@ 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")))
(unless (featurep :system 'windows)
;; HACK: Frustratingly enough, the value of `lsp-zig-download-url-format' is
;; used immediately while the lsp-zig package is loading, so changing it
;; *after* lsp-zig makes no difference. What's worse, the variable is a
;; constant, so we can't change it *before* the package is loaded either!
;; Thank god a (non-inlined) function is used to build the URL, so we have
;; something to advise.
;; REVIEW: Remove when zigtools/zls#1879 is resolved.
(defadvice! +lsp--use-correct-zls-download-url-a (fn &rest args)
"See zigtools/zls#1879."
:around #'lsp-zig--zls-url
(let ((lsp-zig-download-url-format
"https://github.com/zigtools/zls/releases/latest/download/zls-%s-%s.tar.xz"))
(apply fn args))))
:config
(add-to-list 'doom-debug-variables 'lsp-log-io)