-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_gitconfig.tmpl
118 lines (100 loc) · 2.82 KB
/
dot_gitconfig.tmpl
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# -*-mode:gitconfig-*- vim:ft=dosini
# -*-mode:ini-*- vim:ft=gitconfig
# ~/.gitconfig
# =============================================================================
# User-specific Git configuration file.
#
# See https://git-scm.com/docs/git-config
#
# {{- /* This file supports Go's text/template language. */}}
{{ $gh := lookPath "gh" -}}
{{ $delta := lookPath "delta" -}}
[init]
defaultBranch = main
{{ if $delta -}}
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta "gruvmax-fang"]
# author: https://github.com/maxfangx
# General appearance
dark = true
syntax-theme = gruvbox-dark
# File
file-style = "#FFFFFF" bold
file-added-label = [+]
file-copied-label = [==]
file-modified-label = [*]
file-removed-label = [-]
file-renamed-label = [->]
file-decoration-style = "#434C5E" ul
file-decoration-style = "#84786A" ul
# No hunk headers
hunk-header-style = omit
# Line numbers
line-numbers = true
line-numbers-left-style = "#84786A"
line-numbers-right-style = "#84786A"
line-numbers-minus-style = "#A02A11"
line-numbers-plus-style = "#479B36"
line-numbers-zero-style = "#84786A"
line-numbers-left-format = " {nm:>3} │"
line-numbers-right-format = " {np:>3} │"
# Diff contents
inline-hint-style = syntax
minus-style = syntax "#330011"
minus-emph-style = syntax "#80002a"
minus-non-emph-style = syntax auto
plus-style = syntax "#001a00"
plus-emph-style = syntax "#003300"
plus-non-emph-style = syntax auto
whitespace-error-style = "#FB4934" reverse
# Commit hash
commit-decoration-style = normal box
commit-style = "#ffffff" bold
# Blame
blame-code-style = syntax
blame-format = "{author:>18} ({commit:>8}) {timestamp:<13} "
; blame-palette = "#000000" "#1d2021" "#282828" "#3c3836"
# Merge conflicts
merge-conflict-begin-symbol = ⌃
merge-conflict-end-symbol = ⌄
merge-conflict-ours-diff-header-style = "#FABD2F" bold
merge-conflict-theirs-diff-header-style = "#FABD2F" bold overline
merge-conflict-ours-diff-header-decoration-style = ''
merge-conflict-theirs-diff-header-decoration-style = ''
[delta]
navigate = true
dark = true
side-by-side = true
features = gruvmax-fang
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
{{- end }}
[diff "lockb"]
textconv = bun
binary = true
[gpg]
format = ssh
[gpg "ssh"]
program = "/opt/1Password/op-ssh-sign"
allowedSignersFile = {{ .chezmoi.homeDir }}/.ssh/allowed_signers
[commit]
gpgsign = true
[user]
signingkey = {{ .signingkey | quote }}
email = {{ .email | quote }}
name = {{ .name | quote }}
{{ if $gh -}}
[credential "https://github.com"]
helper = !{{ $gh }} auth git-credential
[credential "https://gist.github.com"]
helper = !{{ $gh }} auth git-credential
{{- end }}
[color]
ui = true
[include]
path = {{ .chezmoi.homeDir }}/.gitinclude