forked from ztlevi/doom-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
+git.el
86 lines (68 loc) · 2.88 KB
/
+git.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
;;; +git.el -*- lexical-binding: t; -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GIT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(after! git-link
(setq git-link-open-in-browser nil
git-link-use-commit t)
(add-to-list 'git-link-remote-alist
'("git\\.amazon\\.com" git-link-amazon-code))
(add-to-list 'git-link-commit-remote-alist
'("git\\.amazon\\.com" git-link-commit-amazon-code))
(add-to-list 'git-link-remote-alist
'("amazonaws\\.com" git-link-aws-codecommit))
(add-to-list 'git-link-commit-remote-alist
'("amazonaws\\.com" git-link-commit-aws-codecommit))
;; For some company still uses http git server
;; (add-to-list 'git-link-remote-alist
;; '("git\\.dummy\\.com" git-link-github-http))
;; (add-to-list 'git-link-commit-remote-alist
;; '("git\\.dummy\\.com" git-link-commit-github-http))
;; OVERRIDE
(advice-add #'git-link--select-remote :override #'git-link--read-remote))
(after! magit
(setq magit-save-repository-buffers nil
git-commit-style-convention-checks nil
magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
;; Add git-credential-manager-core support
(add-hook 'magit-process-prompt-functions
'magit-process-git-credential-manager-core)
;; fix magit prompt for midway auth
(appendq! magit-process-password-prompt-regexps '("Kerberos authentication failed. Password:"))
(magit-wip-after-apply-mode t)
(magit-wip-before-change-mode t))
(after! forge
;; (push '("git.dummy.com" "git.dummy.com/api/v3" "git.dummy.com" forge-github-repository)
;; forge-alist)
;; TEMP
;; (setq ghub-use-workaround-for-emacs-bug 'force)
;; Only show issues and pullreqs assigned to me. Toggle it off here.
;; (+my/forge-toggle-all-issues-and-pullreqs)
)
(use-package! magit-delta
:after magit
:init
(when (executable-find "delta")
(add-hook! magit-mode #'magit-delta-mode))
:config
(setq magit-delta-default-light-theme "GitHub")
)
(after! magit-todos
(setq magit-todos-exclude-globs '("third-party/*" "third_party/*")))
;; magit-todos uses hl-todo-keywords
(custom-theme-set-faces! doom-theme
`(hl-todo :foreground ,(doom-color 'bg)))
(after! hl-todo
(setq hl-todo-color-background t
hl-todo-keyword-faces
`(("TODO" . ,(doom-color 'orange))
("HACK" . ,(doom-color 'orange))
("TEMP" . ,(doom-color 'orange))
("DONE" . ,(doom-color 'green))
("NOTE" . ,(doom-color 'green))
("DONT" . ,(doom-color 'red))
("DEBUG" . ,(doom-color 'red))
("FAIL" . ,(doom-color 'red))
("FIXME" . ,(doom-color 'red))
("XXX" . ,(doom-color 'blue))
("XXXX" . ,(doom-color 'blue)))))