501-git: reorganize use-packages
* magit custom adaptions * new defun 'my/magit-default.options' * enforce package ''magithub' Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -17,13 +17,15 @@
|
|||||||
("<C-tab>" . magit-section-cycle)
|
("<C-tab>" . magit-section-cycle)
|
||||||
:map magit-branch-section-map
|
:map magit-branch-section-map
|
||||||
("RET" . magit-checkout))
|
("RET" . magit-checkout))
|
||||||
|
:custom
|
||||||
|
(magit-use-overlays nil)
|
||||||
|
(magit-section-visibility-indicator nil)
|
||||||
|
(magit-completing-read-function 'ivy-completing-read)
|
||||||
|
(magit-push-always-verify nil)
|
||||||
|
(magit-repository-directories '("~/src/"))
|
||||||
|
(bind-key "v" 'visit-pull-request-url magit-mode-map)
|
||||||
:config
|
:config
|
||||||
(add-hook 'after-save-hook 'magit-after-save-refresh-status)
|
(add-hook 'after-save-hook 'magit-after-save-refresh-status)
|
||||||
(setq magit-use-overlays nil
|
|
||||||
magit-section-visibility-indicator nil
|
|
||||||
magit-completing-read-function 'ivy-completing-read
|
|
||||||
magit-push-always-verify nil
|
|
||||||
magit-repository-directories '("~/src/"))
|
|
||||||
(use-package git-timemachine
|
(use-package git-timemachine
|
||||||
:bind (("C-x v t" . git-timemachine)))
|
:bind (("C-x v t" . git-timemachine)))
|
||||||
(use-package git-link
|
(use-package git-link
|
||||||
@@ -42,27 +44,34 @@
|
|||||||
(magit-get-remote)
|
(magit-get-remote)
|
||||||
"url"))
|
"url"))
|
||||||
(cdr (magit-get-remote-branch)))))
|
(cdr (magit-get-remote-branch)))))
|
||||||
|
(defvar my/magit-default-options
|
||||||
(bind-key "v" 'visit-pull-request-url magit-mode-map)
|
`(
|
||||||
|
(pulling "--rebase")
|
||||||
|
))
|
||||||
|
)
|
||||||
|
|
||||||
;; Do Not Show Recent Commits in status window
|
;; Do Not Show Recent Commits in status window
|
||||||
;; https://github.com/magit/magit/issues/3230#issuecomment-339900039
|
;; https://github.com/magit/magit/issues/3230#issuecomment-339900039
|
||||||
(magit-add-section-hook 'magit-status-sections-hook
|
(magit-add-section-hook 'magit-status-sections-hook
|
||||||
'magit-insert-unpushed-to-upstream
|
'magit-insert-unpushed-to-upstream
|
||||||
'magit-insert-unpushed-to-upstream-or-recent
|
'magit-insert-unpushed-to-upstream-or-recent
|
||||||
'replace))
|
'replace)
|
||||||
|
|
||||||
;; load forge to handle github, gitlab, etc
|
;; load forge to handle github, gitlab, etc
|
||||||
;;(require 'forge)
|
;;(require 'forge)
|
||||||
(use-package forge
|
(use-package forge
|
||||||
|
:ensure t
|
||||||
:after magit)
|
:after magit)
|
||||||
|
|
||||||
(defvar my/magit-default-options
|
(use-package magithub
|
||||||
`(
|
:ensure t
|
||||||
(pulling "--rebase")
|
:after magit
|
||||||
))
|
:config
|
||||||
|
(magithub-feature-autoinject t)
|
||||||
|
(setq magithub-clone-default-directory "~/github"))
|
||||||
|
|
||||||
;;(advice-add 'magit-key-mode :filter-args #'magit-key-mode--add-default-options)
|
;;(advice-add 'magit-key-mode :filter-args #'magit-key-mode--add-default-options)
|
||||||
|
|
||||||
(provide '501-git)
|
(provide '501-git)
|
||||||
|
;; End:
|
||||||
;;; 501-git.el ends here
|
;;; 501-git.el ends here
|
||||||
|
|||||||
Reference in New Issue
Block a user