core-popups: attach popup hacks to window-setup-hook (fix #29)
This commit is contained in:
parent
ccabb9f6ee
commit
2a9a1ef186
1 changed files with 156 additions and 155 deletions
|
@ -212,7 +212,8 @@ properties."
|
|||
;; Hacks
|
||||
;;
|
||||
|
||||
(after! evil
|
||||
(add-hook! 'window-setup-hook
|
||||
(after! evil
|
||||
(let ((map doom-popup-mode-map))
|
||||
(define-key map [remap evil-window-delete] 'doom/popup-close)
|
||||
(define-key map [remap evil-window-move-very-bottom] 'ignore)
|
||||
|
@ -277,7 +278,7 @@ the command buffer."
|
|||
(advice-add 'windmove-find-other-window :override 'doom*ignore-window-parameters-in-popups))
|
||||
|
||||
|
||||
(after! help-mode
|
||||
(after! help-mode
|
||||
;; Help buffers use `other-window' to decide where to open followed links,
|
||||
;; which can be unpredictable. It should *only* replace the original buffer we
|
||||
;; opened the popup from. To fix this these three button types need to be
|
||||
|
@ -315,12 +316,12 @@ the command buffer."
|
|||
(doom--switch-from-popup (find-function-search-for-symbol fun 'defface file)))))
|
||||
|
||||
|
||||
;; (after! magit
|
||||
;; ;; Don't open files (from magit) within the magit popup
|
||||
;; (advice-add 'magit-display-file-buffer-traditional :around 'doom*popups-save))
|
||||
;; (after! magit
|
||||
;; ;; Don't open files (from magit) within the magit popup
|
||||
;; (advice-add 'magit-display-file-buffer-traditional :around 'doom*popups-save))
|
||||
|
||||
|
||||
(after! neotree
|
||||
(after! neotree
|
||||
(defun doom*popups-save-neotree (orig-fn &rest args)
|
||||
"Prevents messing up the neotree buffer on window changes."
|
||||
(let ((neo-p (and (featurep 'neotree)
|
||||
|
@ -341,7 +342,7 @@ the command buffer."
|
|||
(advice-add 'evil-window-move-far-right :around 'doom*popups-save-neotree))
|
||||
|
||||
|
||||
(add-hook! org-load
|
||||
(add-hook! 'org-load-hook
|
||||
(set! :popup
|
||||
'("*Calendar*" :size 0.4 :noselect t)
|
||||
'(" *Org todo*" :size 5 :noselect t)
|
||||
|
@ -391,9 +392,9 @@ the command buffer."
|
|||
(define-key map "Q" 'org-agenda-Quit))))
|
||||
|
||||
|
||||
(after! repl-toggle
|
||||
(after! repl-toggle
|
||||
(add-hook! doom-popup-close
|
||||
(setq rtog/--last-buffer nil)))
|
||||
(setq rtog/--last-buffer nil))))
|
||||
|
||||
(provide 'core-popups)
|
||||
;;; core-popups.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue