tools/magit: gate magithub behind +hub flag

Use +magit-hub-features to customize which features to load. Set it to
`t` to load all features.
This commit is contained in:
Henrik Lissner 2018-05-31 21:29:28 +02:00
parent 5c8ff3ada3
commit 1a28a0c088
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 14 additions and 3 deletions

View file

@ -56,7 +56,7 @@
;gist ; interacting with github gists ;gist ; interacting with github gists
;macos ; MacOS-specific commands ;macos ; MacOS-specific commands
;make ; run make tasks from Emacs ;make ; run make tasks from Emacs
;magit ; ;(magit +hub) ;
;password-store ; password manager for nerds ;password-store ; password manager for nerds
pdf ; pdf enhancements pdf ; pdf enhancements
;prodigy ; FIXME managing external services & code builders ;prodigy ; FIXME managing external services & code builders

View file

@ -1,5 +1,14 @@
;;; tools/magit/config.el -*- lexical-binding: t; -*- ;;; tools/magit/config.el -*- lexical-binding: t; -*-
(defvar +magit-hub-features
'(pull-request-merge commit-browse completion)
"TODO")
;;
;; Plugins
;;
(def-package! magit (def-package! magit
:defer t :defer t
:config :config
@ -20,6 +29,7 @@
(def-package! magithub (def-package! magithub
:when (featurep! +hub)
:after magit :after magit
:preface :preface
(setq magithub-dir (concat doom-etc-dir "magithub/")) (setq magithub-dir (concat doom-etc-dir "magithub/"))
@ -27,7 +37,7 @@
(setq magithub-clone-default-directory "~/" (setq magithub-clone-default-directory "~/"
magithub-preferred-remote-method 'clone_url) magithub-preferred-remote-method 'clone_url)
:config :config
(magithub-feature-autoinject t)) (magithub-feature-autoinject +magit-hub-features))
(def-package! magit-gitflow (def-package! magit-gitflow

View file

@ -2,7 +2,8 @@
;;; tools/magit/packages.el ;;; tools/magit/packages.el
(when (package! magit) (when (package! magit)
(package! magithub)
(package! magit-gitflow) (package! magit-gitflow)
(when (featurep! +hub)
(package! magithub))
(when (featurep! :feature evil) (when (featurep! :feature evil)
(package! evil-magit))) (package! evil-magit)))