From b78998dbada2068f6d54f6496bdfafd39753ea33 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 3 Jun 2021 12:40:02 +0200 Subject: [PATCH] Magit: Set list of repos in separate file for easier external parsing. --- .emacs.d/init.el | 5 +---- .emacs.d/lisp/init-magit.el | 9 +++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .emacs.d/lisp/init-magit.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index c9c7f50d..42981034 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -214,10 +214,7 @@ ;; Avoid conflict with WM. (define-key magit-mode-map (kbd "s-") nil) (setq magit-diff-refine-hunk 'all) - (setq magit-repository-directories '(("~/.password-store") ; TODO: Sync with homesync / homeinit? - ("~/common-lisp" . 1) - ("~/projects" . 1) - ("~/.local/share/emacs/site-lisp" . 1))) + (require 'init-magit) ;; magit-todos can be slow on big projects. Use it manually. ;; (when (require 'magit-todos nil 'noerror) ;; (magit-todos-mode)) diff --git a/.emacs.d/lisp/init-magit.el b/.emacs.d/lisp/init-magit.el new file mode 100644 index 00000000..b5c2148f --- /dev/null +++ b/.emacs.d/lisp/init-magit.el @@ -0,0 +1,9 @@ +;; This file is meant to be loadable without dependencies. +;; This allows external programs to easily access the list of repository directories. + +(setq magit-repository-directories '(("~/.password-store") + ("~/common-lisp" . 1) + ("~/projects" . 1) + ("~/.local/share/emacs/site-lisp" . 1))) + +(provide 'init-magit)