From f5297ff40d385a943544f4808fa4c4aa0de8c89e Mon Sep 17 00:00:00 2001 From: Gregor Grigorjan Date: Tue, 12 Dec 2023 13:17:02 +0200 Subject: [PATCH] refactor(emacs): clean up magit config --- modules/nixos/programs/emacs/init.el | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/modules/nixos/programs/emacs/init.el b/modules/nixos/programs/emacs/init.el index 02b49cb9..130c9a27 100644 --- a/modules/nixos/programs/emacs/init.el +++ b/modules/nixos/programs/emacs/init.el @@ -429,21 +429,14 @@ (use-package magit :hook (magit-log-mode . magit-diff-show-or-scroll-up) - :init - (defun gg/bury-magit-buffer-and-revision () - (interactive) - (ignore-errors (magit-log-bury-buffer -1)) - (magit-mode-bury-buffer)) :custom (magit-no-confirm '(set-and-push stage-all-changes unstage-all-changes)) - (magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1) + (magit-bury-buffer-function #'magit-restore-window-configuration) + (magit-revision-show-gravatars t) + (magit-display-buffer-function 'magit-display-buffer-fullframe-status-v1) :general (gg/leader "v" #'magit-status) - (general-def - :states '(normal visual) - :keymaps 'magit-mode-map - "q" #'gg/bury-magit-buffer-and-revision) (general-def :states '(normal visual) :keymaps 'magit-log-mode-map