:type '(choice (boolean :tag "Whether to inhibit autoreconnection")
(integer :tag "Number of seconds")))
+(defcustom eglot-autoshutdown nil
+ "If non-nil, shut down server after killing last managed buffer."
+ :type 'boolean)
+
(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
(setq eglot--cached-current-server nil)
(when server
(setf (eglot--managed-buffers server)
- (delq buf (eglot--managed-buffers server)))))))))
+ (delq buf (eglot--managed-buffers server)))
+ (when (and eglot-autoshutdown
+ (not (eglot--shutdown-requested server))
+ (not (eglot--managed-buffers server)))
+ (eglot-shutdown server))))))))
(defun eglot--current-server ()
"Find the current logical EGLOT server."