emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 9ae03af 39/62: Close #41: Control the size of the


From: Stefan Monnier
Subject: [elpa] externals/eglot 9ae03af 39/62: Close #41: Control the size of the events buffer
Date: Sat, 29 Sep 2018 17:13:34 -0400 (EDT)

branch: externals/eglot
commit 9ae03af9ccb666b0d4f1869cf65ad58fcc0c02e6
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Close #41: Control the size of the events buffer
    
    * eglot.el (eglot-events-buffer-size): New defcustom.
    (eglot--connect): Use it.
---
 eglot.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/eglot.el b/eglot.el
index ac529dc..eeea104 100644
--- a/eglot.el
+++ b/eglot.el
@@ -154,6 +154,14 @@ as 0, i.e. don't block at all."
   :type '(choice (boolean :tag "Whether to inhibit autoreconnection")
                  (integer :tag "Number of seconds")))
 
+(defcustom eglot-events-buffer-size 2000000
+  "Control the size of the Eglot events buffer.
+If a number, don't let the buffer grow larger than that many
+characters.  If 0, don't use an event's buffer at all.  If nil,
+let the buffer grow forever."
+  :type '(choice (const :tag "No limit" nil)
+                 (integer :tag "Number of characters")))
+
 ;;; API (WORK-IN-PROGRESS!)
 ;;;
 (cl-defmacro eglot--with-live-buffer (buf &rest body)
@@ -502,6 +510,7 @@ This docstring appeases checkdoc, that's all."
           (apply
            #'make-instance class
            :name readable-name
+           :events-buffer-scrollback-size eglot-events-buffer-size
            :notification-dispatcher (funcall spread 
#'eglot-handle-notification)
            :request-dispatcher (funcall spread #'eglot-handle-request)
            :on-shutdown #'eglot--on-shutdown



reply via email to

[Prev in Thread] Current Thread [Next in Thread]