;; -*- lexical-binding: t; -*- ;; Configuration for built-ins that don't fit anywhere else (use-package custom :straight (:type built-in) :defer t :config (evil-collection-custom-setup)) (use-package view :straight (:type built-in) :defer t :config (evil-collection-view-setup)) (use-package simple :straight (:type built-in) :general (leader-map "!" #'shell-command "|" #'shell-command-on-region ";" #'async-shell-command) (normal special-mode-map "gr" #'revert-buffer "q" #'quit-window) (normal messages-buffer-mode-map "gr" #'revert-buffer "q" #'quit-window)) (use-package shell :straight (:type built-in) :general (normal shell-mode-map "q" #'bury-buffer)) (use-package ediff :defer t :straight (:type built-in) :config (setq ediff-window-setup-function #'ediff-setup-windows-plain) (evil-collection-ediff-setup) ;; Restore window configuration after an ediff session (defvar ediff-last-windows nil) (defun store-pre-ediff-winconfig () (setq ediff-last-windows (current-window-configuration))) (defun restore-pre-ediff-winconfig () (set-window-configuration ediff-last-windows)) (add-hook 'ediff-before-setup-hook #'store-pre-ediff-winconfig) (add-hook 'ediff-quit-hook #'restore-pre-ediff-winconfig)) (use-package replace :defer t :straight (:type built-in) :config (evil-collection-replace-setup)) (use-package hideshow :straight (:type built-in) :hook (prog-mode . hs-minor-mode) :init (general-def 'normal "zM" #'hs-hide-level)) (provide 'init-built-ins)