Move magit from features/version-control to new tools/magit module
This commit is contained in:
parent
d84222b6d0
commit
f8fa07d668
5 changed files with 59 additions and 17 deletions
|
@ -76,6 +76,7 @@
|
||||||
impatient-mode ; show off code over HTTP
|
impatient-mode ; show off code over HTTP
|
||||||
;macos ; MacOS-specific commands
|
;macos ; MacOS-specific commands
|
||||||
make ; run make tasks from Emacs
|
make ; run make tasks from Emacs
|
||||||
|
;magit ;
|
||||||
neotree ; a project drawer, like NERDTree for vim
|
neotree ; a project drawer, like NERDTree for vim
|
||||||
password-store ; password manager for nerds
|
password-store ; password manager for nerds
|
||||||
pdf ; pdf enhancements
|
pdf ; pdf enhancements
|
||||||
|
|
|
@ -65,8 +65,6 @@
|
||||||
(def-package! git-timemachine
|
(def-package! git-timemachine
|
||||||
:commands (git-timemachine git-timemachine-toggle)
|
:commands (git-timemachine git-timemachine-toggle)
|
||||||
:config
|
:config
|
||||||
(require 'magit-blame)
|
|
||||||
|
|
||||||
;; Sometimes I forget `git-timemachine' is enabled in a buffer, so instead of
|
;; Sometimes I forget `git-timemachine' is enabled in a buffer, so instead of
|
||||||
;; showing revision details in the minibuffer, show them in
|
;; showing revision details in the minibuffer, show them in
|
||||||
;; `header-line-format', which has better visibility.
|
;; `header-line-format', which has better visibility.
|
||||||
|
@ -77,19 +75,6 @@
|
||||||
(add-hook 'git-timemachine-mode-hook #'evil-force-normal-state))
|
(add-hook 'git-timemachine-mode-hook #'evil-force-normal-state))
|
||||||
|
|
||||||
|
|
||||||
(def-package! magit
|
|
||||||
:defer t
|
|
||||||
:init (load "magit-autoloads" nil t)
|
|
||||||
:config
|
|
||||||
(set! :popup "^\\*?magit" :ignore)
|
|
||||||
(set! :evil-state 'magit-status-mode 'emacs)
|
|
||||||
(after! evil
|
|
||||||
;; Switch to emacs state only while in `magit-blame-mode', then back when
|
|
||||||
;; its done (since it's a minor-mode).
|
|
||||||
(add-hook! 'magit-blame-mode-hook
|
|
||||||
(evil-local-mode (if magit-blame-mode -1 +1)))))
|
|
||||||
|
|
||||||
|
|
||||||
(def-package! git-link
|
(def-package! git-link
|
||||||
:commands (git-link git-link-commit git-link-homepage))
|
:commands (git-link git-link-commit git-link-homepage))
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
(package! git-link)
|
(package! git-link)
|
||||||
(package! git-timemachine)
|
(package! git-timemachine)
|
||||||
(package! gitconfig-mode)
|
(package! gitconfig-mode)
|
||||||
(package! gitignore-mode)
|
(package! gitignore-mode))
|
||||||
(package! magit))
|
|
||||||
|
|
||||||
;;; TODO +hg
|
;;; TODO +hg
|
||||||
|
|
50
modules/tools/magit/config.el
Normal file
50
modules/tools/magit/config.el
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
;;; tools/magit/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(def-package! magit
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(load "magit-autoloads" nil t)
|
||||||
|
:config
|
||||||
|
(set! :popup "^\\*?magit" :ignore)
|
||||||
|
(set! :evil-state 'magit-status-mode 'emacs)
|
||||||
|
|
||||||
|
(push 'magit-repolist-mode evil-snipe-disabled-modes)
|
||||||
|
(map! :map magit-repolist-mode-map
|
||||||
|
:n "j" #'next-line
|
||||||
|
:n "k" #'previous-line
|
||||||
|
:n "s" #'magit-repolist-status)
|
||||||
|
|
||||||
|
;; (add-hook 'magit-popup-mode-hook #'hide-mode-line-mode)
|
||||||
|
;; (set! :popup "^.*magit" '((slot . -1) (side . right) (size . 80)) '((modeline . nil) (select . t)))
|
||||||
|
;; (set! :popup "^\\*magit.*popup\\*" '((slot . 0) (side . right)) '((modeline . nil) (select . t)))
|
||||||
|
;; (set! :popup "^.*magit-revision:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((modeline . nil) (select . t)))
|
||||||
|
;; (set! :popup "^.*magit-diff:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((modeline . nil) (select . nil)))
|
||||||
|
|
||||||
|
(after! evil
|
||||||
|
;; Switch to emacs state only while in `magit-blame-mode', then back when
|
||||||
|
;; its done (since it's a minor-mode).
|
||||||
|
(add-hook! 'magit-blame-mode-hook
|
||||||
|
(evil-local-mode (if magit-blame-mode -1 +1)))))
|
||||||
|
|
||||||
|
|
||||||
|
(def-package! magit-blame
|
||||||
|
:commands magit-blame
|
||||||
|
:after git-timemachine)
|
||||||
|
|
||||||
|
|
||||||
|
(def-package! magithub
|
||||||
|
:commands (magithub-clone magithub-feature-autoinject)
|
||||||
|
:after magit
|
||||||
|
:config
|
||||||
|
(load "magithub-autoloads" nil t)
|
||||||
|
(magithub-feature-autoinject t)
|
||||||
|
(setq magithub-dir (concat doom-etc-dir "magithub/")
|
||||||
|
magithub-clone-default-directory "~/"
|
||||||
|
magithub-preferred-remote-method 'clone_url))
|
||||||
|
|
||||||
|
|
||||||
|
(def-package! evil-magit
|
||||||
|
:when (featurep! :feature evil)
|
||||||
|
:after magit
|
||||||
|
:config
|
||||||
|
(setq evil-magit-state 'normal))
|
7
modules/tools/magit/packages.el
Normal file
7
modules/tools/magit/packages.el
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; tools/magit/packages.el
|
||||||
|
|
||||||
|
(package! magit)
|
||||||
|
(package! magithub)
|
||||||
|
(when (featurep! :feature evil)
|
||||||
|
(package! evil-magit))
|
Loading…
Add table
Add a link
Reference in a new issue