From 5525fda4bf18463454b1b41161df035e1e4792bc Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 9 Oct 2024 11:41:12 -0600 Subject: [PATCH] [Emacs] Make magit faster for nixpkgs --- dotfiles/emacs.d/README.org | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index fdc1728c..82aca928 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -3153,10 +3153,32 @@ My org-mode configuration now lives in its own file org-config.org. (unbind-key "C-j" magit-hunk-section-map) (unbind-key "C-j" magit-file-section-map) (unbind-key "C-j" magit-diff-section-base-map) + (remove-hook 'magit-status-headers-hook 'magit-insert-tags-header) + (setq magit-revision-insert-related-refs nil) + (remove-hook 'magit-status-sections-hook 'magit-insert-unpulled-from-upstream) + (remove-hook 'magit-status-sections-hook 'magit-insert-unpushed-to-upstream-or-recent) (setq magit-last-seen-setup-instructions "1.4.0" magit-display-buffer-function 'magit-display-buffer-same-window-except-diff-v1) (magit-auto-revert-mode) + (dir-locals-set-class-variables + 'huge-git-repository + '((nil + . ((magit-refresh-buffers . nil) + (magit-revision-insert-related-refs . nil))) + (magit-status-mode + . ((eval . (magit-disable-section-inserter 'magit-insert-tags-header)) + (eval . (magit-disable-section-inserter 'magit-insert-recent-commits)) + (eval . (magit-disable-section-inserter 'magit-insert-unpushed-to-pushremote)) + (eval . (magit-disable-section-inserter 'magit-insert-unpushed-to-upstream-or-recent)) + (eval . (magit-disable-section-inserter 'magit-insert-unpulled-from-pushremote)) + (eval . (magit-disable-section-inserter 'magit-insert-unpulled-from-pushremote)) + (eval . (magit-disable-section-inserter 'magit-insert-unpulled-from-upstream)) + )) + )) + + (dir-locals-set-directory-class + "/home/imalison/Projects/nixpkgs" 'huge-git-repository) (add-to-list 'org-show-context-detail '(magit-goto . lineage)) (advice-add 'magit-diff-visit-file :after 'imalison:after-magit-visit-file)