refactor(lsp): obsolete eglot-events-buffer-size

Ref: 88c46bd4db
This commit is contained in:
Henrik Lissner 2024-03-11 20:39:38 -04:00 committed by Yann Esposito (Yogsototh)
parent f5156be684
commit c0a46b3bc4
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -16,15 +16,15 @@
(setq eglot-sync-connect 1 (setq eglot-sync-connect 1
eglot-autoshutdown t eglot-autoshutdown t
eglot-send-changes-idle-time 0.5 eglot-send-changes-idle-time 0.5
;; NOTE This setting disable the eglot-events-buffer enabling more ;; NOTE: We disable eglot-auto-display-help-buffer because :select t in
;; consistent performance on long running emacs instance. ;; its popup rule causes eglot to steal focus too often.
;; Default is 2000000 lines. After each new event the whole buffer
;; is pretty printed which causes steady performance decrease over time.
;; CPU is spent on pretty priting and Emacs GC is put under high pressure.
eglot-events-buffer-size 0
;; NOTE We disable eglot-auto-display-help-buffer because :select t in
;; its popup rule causes eglot to steal focus too often.
eglot-auto-display-help-buffer nil) eglot-auto-display-help-buffer nil)
;; NOTE: This setting disable the eglot-events-buffer enabling more consistent
;; performance on long running emacs instance. Default is 2000000 lines.
;; After each new event the whole buffer is pretty printed which causes
;; steady performance decrease over time. CPU is spent on pretty priting and
;; Emacs GC is put under high pressure.
(cl-callf plist-put eglot-events-buffer-config :size 0)
(when (and (modulep! :checkers syntax) (when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake))) (not (modulep! :checkers syntax +flymake)))
(setq eglot-stay-out-of '(flymake))) (setq eglot-stay-out-of '(flymake)))
@ -38,7 +38,7 @@
:type-definition #'eglot-find-typeDefinition :type-definition #'eglot-find-typeDefinition
:documentation #'+eglot-lookup-documentation) :documentation #'+eglot-lookup-documentation)
(add-to-list 'doom-debug-variables '(eglot-events-buffer-size . 2000000)) (add-to-list 'doom-debug-variables '(eglot-events-buffer-size :size 2000000 :format full))
(defadvice! +lsp--defer-server-shutdown-a (fn &optional server) (defadvice! +lsp--defer-server-shutdown-a (fn &optional server)
"Defer server shutdown for a few seconds. "Defer server shutdown for a few seconds.