diff --git a/init.el b/init.el index e188779ebc..4d7c1b7792 100644 --- a/init.el +++ b/init.el @@ -30,6 +30,12 @@ (add-hook 'emacs-startup-hook (lambda () (setq gc-cons-threshold normal-gc-cons-threshold)))) + +;; Process performance tuning + +(setq read-process-output-max (* 4 1024 1024)) +(setq process-adaptive-read-buffering nil) + ;; Bootstrap config @@ -130,6 +136,7 @@ (require 'init-ledger) (require 'init-lua) +(require 'init-terminals) ;; Extra packages which don't require any configuration diff --git a/lisp/init-eglot.el b/lisp/init-eglot.el index 9cf28b84f0..5b13d68e6a 100644 --- a/lisp/init-eglot.el +++ b/lisp/init-eglot.el @@ -4,15 +4,10 @@ ;;; Code: -;; For Emacs >= 27 -(setq read-process-output-max (* 1024 1024)) - - (when (maybe-require-package 'eglot) (maybe-require-package 'consult-eglot)) - (provide 'init-eglot) ;;; init-eglot.el ends here diff --git a/lisp/init-terminals.el b/lisp/init-terminals.el new file mode 100644 index 0000000000..44fc00a77b --- /dev/null +++ b/lisp/init-terminals.el @@ -0,0 +1,27 @@ +;;; init-terminals.el --- Terminal emulators -*- lexical-binding: t; -*- + +;;; Commentary: + +;;; Code: + +(when (maybe-require-package 'eat) + (defun sanityinc/on-eat-exit (process) + (when (zerop (process-exit-status process)) + (kill-buffer) + (unless (eq (selected-window) (next-window)) + (delete-window)))) + (add-hook 'eat-exit-hook 'sanityinc/on-eat-exit) + + (defcustom sanityinc/eat-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "t") 'eat-other-window) + map) + "Prefix map for commands that create and manipulate eat buffers.") + (fset 'sanityinc/eat-map sanityinc/eat-map) + + (global-set-key (kbd "C-c t") 'sanityinc/eat-map)) + + + +(provide 'init-terminals) +;;; init-terminals.el ends here