Improve profiler popup integration
Following profiler links will open in different window; also displays CPU/Memory reports side by side.
This commit is contained in:
parent
1e1f725a55
commit
9b1b75f947
2 changed files with 11 additions and 1 deletions
|
@ -316,6 +316,14 @@ instead of switch-to-buffer-*."
|
||||||
(set-popup-rule! "\\(^\\*Contents\\|'s annots\\*$\\)" :ignore t))
|
(set-popup-rule! "\\(^\\*Contents\\|'s annots\\*$\\)" :ignore t))
|
||||||
|
|
||||||
|
|
||||||
|
;; `profiler'
|
||||||
|
(defun doom*profiler-report-find-entry-in-other-window (orig-fn function)
|
||||||
|
(cl-letf (((symbol-function 'find-function)
|
||||||
|
(symbol-function 'find-function-other-window)))
|
||||||
|
(funcall orig-fn function)))
|
||||||
|
(advice-add #'profiler-report-find-entry :around #'doom*profiler-report-find-entry-in-other-window)
|
||||||
|
|
||||||
|
|
||||||
;; `wgrep'
|
;; `wgrep'
|
||||||
(progn
|
(progn
|
||||||
;; close the popup after you're done with a wgrep buffer
|
;; close the popup after you're done with a wgrep buffer
|
||||||
|
|
|
@ -159,7 +159,9 @@ prevent the popup(s) from messing up the UI (or vice versa)."
|
||||||
;; `Info-mode'
|
;; `Info-mode'
|
||||||
("^\\*info\\*$"
|
("^\\*info\\*$"
|
||||||
:slot 2 :vslot 2 :size 0.45 :select t)))
|
:slot 2 :vslot 2 :size 0.45 :select t)))
|
||||||
'(("^\\*Backtrace" :vslot 99 :size 0.4 :quit nil)))
|
'(("^\\*Backtrace" :vslot 99 :size 0.4 :quit nil)
|
||||||
|
("^\\*CPU-Profiler-Report " :side bottom :vslot 100 :slot 1 :height 0.4 :width 0.5 :quit nil)
|
||||||
|
("^\\*Memory-Profiler-Report " :side bottom :vslot 100 :slot 2 :height 0.4 :width 0.5 :quit nil)))
|
||||||
|
|
||||||
(add-hook 'doom-init-ui-hook #'+popup-mode :append)
|
(add-hook 'doom-init-ui-hook #'+popup-mode :append)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue