diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index eb448a7f4..ec1b7132e 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -85,19 +85,25 @@ (require 'doom-nlinum)) -;; Causes a flash around the cursor when it moves across a "large" distance. -;; Usually between windows, or across files. This makes it easier to keep track -;; where your cursor is, which I find helpful on my 30" 2560x1600 display. -(def-package! beacon - :after doom-themes - :config - (beacon-mode +1) - (setq beacon-color (let ((bg (face-attribute 'highlight :background nil t))) - (if (eq bg 'unspecified) - (face-attribute 'highlight :foreground nil t) - bg)) - beacon-blink-when-buffer-changes t - beacon-blink-when-point-moves-vertically 10)) +;; Flashes the line around the cursor after any motion command that might +;; reasonably send the cursor somewhere the eyes can't follow. Tremendously +;; helpful on a 30" 2560x1600 display. +(def-package! nav-flash + :commands nav-flash-show + :init + (defun doom/blink-cursor (&rest _) + "Blink line, to keep track of the cursor." + (interactive) + (nav-flash-show)) + + (add-hook! :append + '(imenu-after-jump-hook focus-in-hook evil-jumps-post-jump-hook find-file-hook) + 'doom/blink-cursor) + + (after! evil + (advice-add 'evil-window-bottom :after 'doom/blink-cursor) + (advice-add 'evil-window-middle :after 'doom/blink-cursor) + (advice-add 'evil-window-top :after 'doom/blink-cursor))) (after! hideshow diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 2d5508a0f..3ef1f6717 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! beacon) (package! doom-themes) +(package! nav-flash)