diff --git a/init.example.el b/init.example.el index 027fcacd1..bd4a173e0 100644 --- a/init.example.el +++ b/init.example.el @@ -56,7 +56,7 @@ ;gist ; interacting with github gists ;macos ; MacOS-specific commands ;make ; run make tasks from Emacs - ;magit ; + ;(magit +hub) ; ;password-store ; password manager for nerds pdf ; pdf enhancements ;prodigy ; FIXME managing external services & code builders diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 06c0759a9..2cffe8aa5 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -1,5 +1,14 @@ ;;; tools/magit/config.el -*- lexical-binding: t; -*- +(defvar +magit-hub-features + '(pull-request-merge commit-browse completion) + "TODO") + + +;; +;; Plugins +;; + (def-package! magit :defer t :config @@ -20,6 +29,7 @@ (def-package! magithub + :when (featurep! +hub) :after magit :preface (setq magithub-dir (concat doom-etc-dir "magithub/")) @@ -27,7 +37,7 @@ (setq magithub-clone-default-directory "~/" magithub-preferred-remote-method 'clone_url) :config - (magithub-feature-autoinject t)) + (magithub-feature-autoinject +magit-hub-features)) (def-package! magit-gitflow diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index d510a8977..5cc34ba2f 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -2,7 +2,8 @@ ;;; tools/magit/packages.el (when (package! magit) - (package! magithub) (package! magit-gitflow) + (when (featurep! +hub) + (package! magithub)) (when (featurep! :feature evil) (package! evil-magit)))