diff --git a/elisp/eshell-setup.el b/elisp/eshell-setup.el deleted file mode 100644 index 8cd7380..0000000 --- a/elisp/eshell-setup.el +++ /dev/null @@ -1,4 +0,0 @@ -(require 'esh-mode) -(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter) -(setq eshell-output-filter-functions - (remove 'eshell-handle-ansi-color eshell-output-filter-functions)) diff --git a/elisp/extras.el b/elisp/extras.el index 1b8f4b4..4be1377 100644 --- a/elisp/extras.el +++ b/elisp/extras.el @@ -72,22 +72,27 @@ ;; Read feeds (use-package elfeed) -;; Programming environment +;; Eshell configuration ;; We need colors in eshell (use-package xterm-color) (use-package eshell :straight (:type built-in) - :hook (eshell-mode . (lambda () - (setenv "TERM" "xterm-256color"))) - :hook (eshell-before-prompt . (lambda () - (setq xterm-color-preserve-properties t))) - :hook (eshell-mode . (lambda () - (progn - (define-key eshell-hist-mode-map (kbd "") nil) - (define-key eshell-hist-mode-map (kbd "") nil)))) + :hook ((eshell-mode . (lambda () + (setenv "TERM" "xterm-256color"))) + ;; remove up and down from history keymap so we can use them to move up and + ;; down like in a normal text + (eshell-mode . (lambda () + (keymap-set eshell-hist-mode-map "" nil) + (keymap-set eshell-hist-mode-map "" nil))) + (eshell-before-prompt . (lambda () + (setq xterm-color-preserve-properties t)))) :config - (load "~/.emacs.d/elisp/eshell-setup.el")) + (require 'esh-mode) + (add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter) + (setq eshell-output-filter-functions + (remove 'eshell-handle-ansi-color eshell-output-filter-functions))) + ;; eat terminal emulator: (use-package eat @@ -98,7 +103,9 @@ "*.ti" ("terminfo/e" "terminfo/e/*") ("terminfo/65" "terminfo/65/*") ("integration" "integration/*") - (:exclude ".dir-locals.el" "*-tests.el")))) + (:exclude ".dir-locals.el" "*-tests.el"))) + :hook ((eshell-first-time-mode . eat-eshell-mode) + (eshell-first-time-mode . eat-eshell-visual-command-mode))) ;; git (use-package magit @@ -126,7 +133,8 @@ :config (load "~/.emacs.d/elisp/slime-setup.el")) -(use-package paredit) +(use-package paredit + :hook ((lisp-mode emacs-lisp-mode) . paredit-mode)) ;; Clojure (use-package cider)