doomemacs/modules/ui/nav-flash/config.el
Henrik Lissner f58f3c3604
ui/nav-flash: refactor
+ Add +nav-flash-exclude-commands to control where
  +nav-flash-blink-cursor-maybe should not trigger nav-flash.
+ Rename API to conform to Doom naming conventions
  + +nav-flash-blink-cursor
  + +nav-flash-blink-cursor-maybe
  + +nav-flash|delayed-blink-cursor
  + +nav-flash|blink-cursor
  + +nav-flash|blink-cursor-maybe
  + +nav-flash*blink-cursor
2018-07-24 20:04:03 +02:00

30 lines
1009 B
EmacsLisp

;;; ui/nav-flash/config.el -*- lexical-binding: t; -*-
(defvar +nav-flash-exclude-commands
'(mouse-set-point evil-mouse-drag-region
+org/dwim-at-point org-find-file org-find-file-at-mouse)
"A list of commands that should not trigger nav-flash.")
(def-package! nav-flash
:defer t
:init
;; NOTE In :feature lookup `recenter' is hooked to a bunch of jumping
;; commands, which will trigger nav-flash.
(add-hook!
'(doom-enter-window-hook
imenu-after-jump-hook evil-jumps-post-jump-hook
counsel-grep-post-action-hook dumb-jump-after-jump-hook)
#'+nav-flash|blink-cursor-maybe)
;; `org'
(add-hook 'org-follow-link-hook #'+nav-flash|delayed-blink-cursor)
;; `saveplace'
(advice-add #'save-place-find-file-hook :after #'+nav-flash*blink-cursor)
;; `evil'
(advice-add #'evil-window-top :after #'+nav-flash*blink-cursor)
(advice-add #'evil-window-middle :after #'+nav-flash*blink-cursor)
(advice-add #'evil-window-bottom :after #'+nav-flash*blink-cursor))