| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
- # config.yml
- #
- # Docs:
- # * https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md
- ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
- gui:
- scrollPastBottom: false
- mouseEvents: false
- nerdFontsVersion: "3"
- border: "single"
- theme:
- inactiveBorderColor:
- - white
- activeBorderColor:
- - yellow
- - bold
- searchingActiveBorderColor:
- - cyan
- - bold
- selectedLineBgColor:
- - yellow
- git:
- autoFetch: true
- autoRefresh: false
- overrideGpg: true
- commit:
- autoWrapCommitMessage: true
- autoWrapWidth: 72
- os:
- edit: "$DOTFILES_DIR/.scripts/lazygit_nvim_editor.zsh {{filename}}"
- editAtLine: "$DOTFILES_DIR/.scripts/lazygit_nvim_editor.zsh {{filename}} {{line}}"
- editAtLineAndWait: "$DOTFILES_DIR/.scripts/lazygit_nvim_editor.zsh {{filename}} {{line}}"
- editInTerminal: false
- update:
- method: never
- refresher:
- fetchInterval: 3600
- customCommands:
- - key: "<c-c>"
- context: "files"
- description: "Create a conventional commit"
- command: /usr/bin/env python3 $DOTFILES_DIR/.scripts/lazygit_add_conventional_commit.py '{{.Form.Type}}' '{{.Form.Scope}}' '{{.Form.Breaking}}' '{{.Form.Subject}}' '{{.Form.Breaking}}'
- prompts:
- - type: "menu"
- key: "Type"
- title: "Type"
- options:
- - name: "feat"
- description: "A new feature"
- value: "feat"
- - name: "fix"
- description: "A bug fix"
- value: "fix"
- - name: "test"
- description: "Adding missing tests or correcting existing tests"
- value: "test"
- - name: "chore"
- description:
- "Changes that do not modify the source code or test files"
- value: "chore"
- - name: " "
- description: ""
- value: "chore" # This line is just here for aesthetics, but should still have a valid value
- - name: "build"
- description:
- "Changes that affect the build system or external dependencies"
- value: "build"
- - name: "ci"
- description: "Changes to CI configuration files and scripts"
- value: "ci"
- - name: "docs"
- description: "Documentation changes"
- value: "docs"
- - name: "perf"
- description: "A code change that improves performance"
- value: "perf"
- - name: "refactor"
- description:
- "A code change that neither fixes a bug nor adds a feature"
- value: "refactor"
- - name: "revert"
- description: "Reverts a previous commit"
- value: "revert"
- - name: "style"
- description: "Changes that do not affect the meaning of the code"
- value: "style"
- - type: "input"
- key: "Scope"
- title: "Scope (optional)"
- suggestions:
- command: |
- git log --pretty='format:%s' | \
- rg '^\S+\((.*?)\)' -or '$1' | \
- cat -n | \
- sort -uk2 | \
- sort -n | \
- cut -f2-
- - type: "input"
- title: "Breaking Change (`no`, `yes`, or custom description)"
- key: "Breaking"
- initialValue: "no"
- suggestions:
- command: "echo yes"
- - type: "input"
- key: "Subject"
- # Did you know? The preference for the imperative mood is included in the Pro Git book!
- # https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project
- title: "Description (<= 50 characters, in imperative mood)"
- - type: "confirm"
- title: "Confirm"
- body: |
- {{.Form.Type}}: {{.Form.Subject}}
- Scope: {{.Form.Scope}}
- Breaking Change: {{.Form.Breaking}}
- - key: "<c-r>"
- context: "commits"
- description: "Set commit dates to author dates"
- command: git rebase "{{ .SelectedCommit.Sha }}^" --committer-date-is-author-date
- prompts:
- - type: "confirm"
- title: "Set commit dates to author dates"
- body: "Are you sure you want to set commit dates equal to author dates?"
- - key: "<c-a>"
- context: "commits"
- description: "Modify author date and commit date"
- command: /usr/bin/env python3 $DOTFILES_DIR/.scripts/lazygit_modify_commit_date.py commit "{{.SelectedLocalCommit.Sha}}" "{{.Form.Commit}}" "{{.Form.Timestamp}}"
- prompts:
- - type: "menu"
- title: "Commit"
- key: "Commit"
- options:
- - name: "Selected"
- description: "The selected commit"
- value: "selected"
- - name: "Following"
- description: "Selected and subsequent commits"
- value: "following"
- - type: "menuFromCommand"
- title: "Select Timestamp"
- key: "InitialValue"
- command: |
- bash -c "\
- date \"+%Y-%m-%d %H:%M:%S %z\";
- date \"+%Y-%m-%d %H:00:00 %z\";
- date \"+%Y-%m-%d 00:00:00 %z\";
- date \"+%Y-%m-01 00:00:00 +0000\";
- git log --pretty=format:%ad --date=iso | uniq | head -1;
- echo \"- Past author dates:\";
- git log --pretty=format:%ad --date=iso | uniq | head -5;
- echo \"- Dummy timestamps:\";
- echo 2005-04-07 15:13:13 -0700;
- echo 0000-00-00 00:00:00 +0000;"
- - type: "input"
- title: "Edit Timestamp"
- key: "Timestamp"
- initialValue: "{{.Form.InitialValue}}"
- - type: "confirm"
- title: "Confirm"
- body: |
- Set author and commit dates for {{.Form.Commit}} commit "{{.SelectedLocalCommit.Name}}" ({{.SelectedLocalCommit.Sha}}) to "{{.Form.Timestamp}}"?'
- - key: "<c-d>"
- context: "localBranches"
- description: "Clean up a local merged branch"
- command: git branch -D {{ .Form.Branch }}
- prompts:
- - type: "menuFromCommand"
- title: "Select Local Branch"
- key: "Branch"
- command: /usr/bin/env zsh -c "/bin/zsh $DOTFILES_DIR/.scripts/lazygit_branch_pruner.zsh print"
- filter: '^(\S+)( .*)$'
- valueFormat: '{{ .group_1 }}'
- labelFormat: '{{ .group_1 }}{{ .group_2 }}'
- - key: "<c-x>"
- context: "localBranches"
- description: "Clean up all local merged branches after pruning"
- command: /usr/bin/env zsh -c "/bin/zsh $DOTFILES_DIR/.scripts/lazygit_branch_pruner.zsh {{ .Form.Confirmation }} true"
- prompts:
- - type: "menuFromCommand"
- title: "Review Branches to be Nuked"
- key: "Confirmation"
- command: /usr/bin/env zsh -c "/bin/zsh $DOTFILES_DIR/.scripts/lazygit_branch_pruner.zsh print true && echo nuke"
|