~ruther/emacs.d

50b655d0f40449d834b864787462c02dc569785b — Rutherther 10 months ago f0e44eb
fix: golden-ratio in ediff
1 files changed, 18 insertions(+), 2 deletions(-)

M init.el
M init.el => init.el +18 -2
@@ 442,6 442,7 @@
  :ensure t
  :custom
  (golden-ratio-exclude-buffer-regexp '("dape"))
  (golden-ratio-exclude-modes '("ediff-mode"))
  ;; Work with evil
  (golden-ratio-extra-commands '(
    evil-window-left


@@ 465,8 466,23 @@
    select-window-9))

  ;; Work with which-key
  (golden-ratio-inhibit-functions '((lambda () (and which-key--buffer
                                                  (window-live-p (get-buffer-window which-key--buffer))))))
  (golden-ratio-inhibit-functions '(
                                    (lambda () (and which-key--buffer
                                                    (window-live-p (get-buffer-window which-key--buffer))))
                                    pl/ediff-comparison-buffer-p
                                    ))
  :hook
  (ediff-startup . my-ediff-startup-hook)
  :init
  (defun my-ediff-startup-hook ()
    "Workaround to balance the ediff windows when golden-ratio is enabled."
    ;; There's probably a better way to do it.
    (ediff-toggle-split)
    (ediff-toggle-split))

  (defun pl/ediff-comparison-buffer-p ()
  (and (boundp 'ediff-this-buffer-ediff-sessions)
       ediff-this-buffer-ediff-sessions))
  :config
  (golden-ratio-mode 1)
  )

Do not follow this link