Skip to content

Commit

Permalink
Add very basic config for eat
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Nov 7, 2023
1 parent 577b105 commit bab418c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
7 changes: 7 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -130,6 +136,7 @@

(require 'init-ledger)
(require 'init-lua)
(require 'init-terminals)

;; Extra packages which don't require any configuration

Expand Down
5 changes: 0 additions & 5 deletions lisp/init-eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
27 changes: 27 additions & 0 deletions lisp/init-terminals.el
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bab418c

Please sign in to comment.