mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-02 14:53:38 -05:00
fix(lsp): shutdown deferral for multiple LSP clients
If a buffer had multiple LSP servers active, `+lsp-defer-server-shutdown-a` would only shut down the first. This adjusts it to not only defer shutdown of all servers, but also ensures `+lsp-optimization-mode` is only disabled when there are no lsp-mode sessions left. Fix: #5409
This commit is contained in:
@@ -21,10 +21,13 @@ killing and opening many LSP/eglot-powered buffers.")
|
||||
:global t
|
||||
:init-value nil
|
||||
(if (not +lsp-optimization-mode)
|
||||
(setq-default read-process-output-max +lsp--default-read-process-output-max
|
||||
gcmh-high-cons-threshold +lsp--default-gcmh-high-cons-threshold
|
||||
+lsp--optimization-init-p nil)
|
||||
;; Only apply these settings once!
|
||||
;; Only apply these settings once! A minor mode's body is triggered each
|
||||
;; time it is called, even if it's already in the desired state.
|
||||
(when +lsp--optimization-init-p
|
||||
(setq-default read-process-output-max +lsp--default-read-process-output-max
|
||||
gcmh-high-cons-threshold +lsp--default-gcmh-high-cons-threshold
|
||||
+lsp--optimization-init-p nil))
|
||||
;; See above.
|
||||
(unless +lsp--optimization-init-p
|
||||
(setq +lsp--default-read-process-output-max (default-value 'read-process-output-max)
|
||||
+lsp--default-gcmh-high-cons-threshold (default-value 'gcmh-high-cons-threshold))
|
||||
|
Reference in New Issue
Block a user