From 5bfdb6264be1c4d809e144006b4ecc78e3889429 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Fri, 13 Jun 2025 13:23:13 -0400 Subject: [PATCH] Enhance eglot defaults --- init.el | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 07e17ec..a5cb375 100644 --- a/init.el +++ b/init.el @@ -424,15 +424,26 @@ ;;; Eglot -(setq eglot-sync-connect 1 - eglot-autoshutdown t) +;; A setting of nil or 0 means Eglot will not block the UI at all, allowing +;; Emacs to remain fully responsive, although LSP features will only become +;; available once the connection is established in the background. +(setq eglot-sync-connect 0) + +(setq eglot-autoshutdown t) ; Shut down server after killing last managed buffer ;; Activate Eglot in cross-referenced non-project files (setq eglot-extend-to-xref t) ;; Eglot optimization -(setq eglot-events-buffer-size 0) -(setq eglot-report-progress nil) ; Prevent Eglot minibuffer spam +(if minimal-emacs-debug + (setq eglot-events-buffer-config '(:size 2000000 :format full)) + ;; This reduces log clutter to improves performance. + (setq jsonrpc-event-hook nil) + ;; Reduce memory usage and avoid cluttering *EGLOT events* buffer + (setq eglot-events-buffer-size 0) ; Deprecated + (setq eglot-events-buffer-config '(:size 0 :format short))) + +(setq eglot-report-progress minimal-emacs-debug) ; Prevent minibuffer spam ;;; Flymake