fix(lsp): eglot-booster-io-only only when needed

On older Emacsen, we want all the help eglot-booster can give.

Ref: #8463
Amend: 1ede94c88a
This commit is contained in:
Henrik Lissner
2025-08-21 16:38:30 +02:00
parent 79c8621091
commit cde7dbbb0f

View File

@@ -59,7 +59,11 @@ server an expensive restart when its buffer is reverted."
:when (modulep! +booster)
:after eglot
:init
(setq eglot-booster-io-only t)
(setq eglot-booster-io-only
;; JSON parser on 30+ is faster, so we only exploit eglot-booster's IO
;; buffering (benefits more talkative LSP servers).
(and (> emacs-major-version 29)
(not (functionp 'json-rpc-connection))))
:config
(eglot-booster-mode +1))