Add .chezmoi.toml.tmpl and improve gitconfig
This commit is contained in:
parent
a85ed4e561
commit
77a7982f2c
|
@ -0,0 +1,32 @@
|
||||||
|
{{- $sysname := promptStringOnce . "sysname" "System name" -}}
|
||||||
|
{{- $sysgroup := promptStringOnce . "sysgroup" "System group" -}}
|
||||||
|
{{- $sysarea := promptStringOnce . "sysarea" "System area" -}}
|
||||||
|
{{- $gitEmail := promptStringOnce . "gitEmail" "email address (for git commits)" -}}
|
||||||
|
{{- $gitName := promptStringOnce . "gitName" "Full name (for git commits)" -}}
|
||||||
|
|
||||||
|
[data]
|
||||||
|
{{- if ($sysname) }}
|
||||||
|
sysname = {{ $sysname | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if ($sysgroup) }}
|
||||||
|
sysgroup = {{ $sysgroup | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if ($sysarea) }}
|
||||||
|
sysarea = {{ $sysarea | quote }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ if ($gitEmail) }}
|
||||||
|
gitEmail = {{ $gitEmail | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if ($gitName) }}
|
||||||
|
gitName = {{ $gitName | quote }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
[diff]
|
||||||
|
# command = "nvim"
|
||||||
|
# args = ["-d", "{{- "{{ .Destination }}" -}}", "{{- "{{ .Target }}" -}}"]
|
||||||
|
|
||||||
|
command = "delta"
|
||||||
|
args = ["--paging=never", "{{ "{{ .Destination }}" }}", "{{ "{{ .Target }}" }}"]
|
||||||
|
pager = "delta"
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
# This is Git's per-user configuration file.
|
# This is Git's per-user configuration file.
|
||||||
|
# It is recommended to edit this using chezmoi:
|
||||||
|
# cz edit ~/.gitconfig
|
||||||
|
|
||||||
|
[include]
|
||||||
|
path = .config/sz.env/lib/delta.themes.gitconfig
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
name = Lockszmith (kateryna)
|
name = {{ .gitName }}
|
||||||
email = code@lksz.me
|
email = {{ .gitEmail }}
|
||||||
|
|
||||||
[credential]
|
[credential]
|
||||||
helper = cache --timeout 21600
|
helper = cache --timeout 21600
|
||||||
helper = oauth
|
helper = oauth
|
||||||
|
@ -13,5 +20,37 @@
|
||||||
# oauthDeviceAuthURL = /login/oauth/authorize
|
# oauthDeviceAuthURL = /login/oauth/authorize
|
||||||
# oauthDeviceAuthURL = /login/oauth/authorize_device
|
# oauthDeviceAuthURL = /login/oauth/authorize_device
|
||||||
# oauthScopes = read_repository
|
# oauthScopes = read_repository
|
||||||
|
[core]
|
||||||
|
editor = nvim
|
||||||
|
pager = delta
|
||||||
|
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
|
||||||
|
[core]
|
||||||
|
pager = delta
|
||||||
|
|
||||||
|
[interactive]
|
||||||
|
diffFilter = delta --color-only
|
||||||
|
|
||||||
|
[delta]
|
||||||
|
features = colibri
|
||||||
|
navigate = true # use n and N to move between diff sections
|
||||||
|
line-numbers = true
|
||||||
|
side-by-side = true
|
||||||
|
|
||||||
[diff]
|
[diff]
|
||||||
tool = vimdiff
|
tool = nvimdiff
|
||||||
|
[difftool]
|
||||||
|
prompt = false
|
||||||
|
[difftool "nvimdiff"]
|
||||||
|
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
|
||||||
|
|
||||||
|
[merge]
|
||||||
|
tool = nvimdiff
|
||||||
|
conflictstyle = zdiff3
|
||||||
|
[mergetool]
|
||||||
|
prompt = true
|
||||||
|
[mergetool "nvimdiff"]
|
||||||
|
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\" \"$MERGED\" -c 'wincmd w' -c 'wincmd J'"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue