Add modules/feature/version-control
This commit is contained in:
parent
76f09d83ff
commit
89c7ee0273
3 changed files with 52 additions and 27 deletions
43
modules/feature/version-control/+git.el
Normal file
43
modules/feature/version-control/+git.el
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
;;; core/version-control/+git.el
|
||||||
|
|
||||||
|
(use-package! gitconfig-mode
|
||||||
|
:mode "/\\.?git/?config$"
|
||||||
|
:mode "/\\.gitmodules$"
|
||||||
|
:init (add-hook 'gitconfig-mode-hook 'flyspell-mode))
|
||||||
|
|
||||||
|
(use-package! gitignore-mode
|
||||||
|
:mode "/\\.?git/?config$"
|
||||||
|
:mode "/\\.gitmodules$")
|
||||||
|
|
||||||
|
|
||||||
|
(use-package! git-gutter-fringe
|
||||||
|
:commands git-gutter-mode
|
||||||
|
:init (add-hook! (text-mode prog-mode conf-mode) 'git-gutter-mode)
|
||||||
|
:config
|
||||||
|
(set! :popup ("^\\*git-gutter.+\\*$" :regexp t :size 15 :noselect t))
|
||||||
|
|
||||||
|
;; Update git-gutter on focus (in case I was using git externally)
|
||||||
|
(add-hook 'focus-in-hook 'git-gutter:update-all-windows)
|
||||||
|
|
||||||
|
(after! evil
|
||||||
|
;; Refreshing git-gutter on ESC
|
||||||
|
(advice-add 'evil-force-normal-state :after 'git-gutter)))
|
||||||
|
|
||||||
|
|
||||||
|
(use-package! browse-at-remote
|
||||||
|
:commands (browse-at-remote/browse browse-at-remote/get-url))
|
||||||
|
|
||||||
|
|
||||||
|
(use-package! magit
|
||||||
|
:commands magit-status
|
||||||
|
:config
|
||||||
|
(def-popup! ("^\\*magit.+" :regexp t))
|
||||||
|
(after! evil-snipe
|
||||||
|
;; evil-snipe conflicts with magit
|
||||||
|
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)))
|
||||||
|
|
||||||
|
|
||||||
|
(use-package! evil-magit
|
||||||
|
:when (featurep 'evil)
|
||||||
|
:after magit)
|
||||||
|
|
|
@ -1,32 +1,7 @@
|
||||||
;;; core/version-control/config.el
|
;;; core/version-control/config.el
|
||||||
|
|
||||||
(use-package! gitconfig-mode
|
(load! +git)
|
||||||
:mode "/\\.?git/?config$"
|
;; (load! +hg)
|
||||||
:mode "/\\.gitmodules$"
|
|
||||||
:init (add-hook 'gitconfig-mode-hook 'flyspell-mode))
|
|
||||||
|
|
||||||
(use-package! gitignore-mode
|
|
||||||
:mode "/\\.?git/?config$"
|
|
||||||
:mode "/\\.gitmodules$")
|
|
||||||
|
|
||||||
|
|
||||||
(use-package! browse-at-remote
|
|
||||||
:commands (browse-at-remote/browse browse-at-remote/get-url))
|
|
||||||
|
|
||||||
|
|
||||||
(use-package! magit
|
|
||||||
:commands magit-status
|
|
||||||
:config
|
|
||||||
(def-popup! ("^\\*magit.+" :regexp t))
|
|
||||||
(after! evil-snipe
|
|
||||||
;; evil-snipe conflicts with magit
|
|
||||||
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)))
|
|
||||||
|
|
||||||
|
|
||||||
(use-package! evil-magit
|
|
||||||
:when (featurep 'evil)
|
|
||||||
:after magit)
|
|
||||||
|
|
||||||
|
|
||||||
(after! vc-annotate
|
(after! vc-annotate
|
||||||
(set! :popup
|
(set! :popup
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
;; -*- no-byte-compile: t; -*-
|
||||||
;;; core/version-control/packages.el
|
;;; core/version-control/packages.el
|
||||||
|
|
||||||
|
;;; config.el
|
||||||
|
;; n/a
|
||||||
|
|
||||||
|
;;; +git
|
||||||
(package! browse-at-remote)
|
(package! browse-at-remote)
|
||||||
(package! evil-magit :needs evil)
|
(package! evil-magit :needs evil)
|
||||||
|
(package! git-gutter-fringe)
|
||||||
(package! gitconfig-mode)
|
(package! gitconfig-mode)
|
||||||
(package! gitignore-mode)
|
(package! gitignore-mode)
|
||||||
(package! magit)
|
(package! magit)
|
||||||
|
|
||||||
|
;;; TODO +hg
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue