lazygit improvements
This commit is contained in:
parent
1a18a8ef30
commit
72bd9ffb3d
2 changed files with 77 additions and 6 deletions
|
@ -1,2 +1,76 @@
|
||||||
gui:
|
gui:
|
||||||
|
nerdFontsVersion: "3"
|
||||||
mouseEvents: false
|
mouseEvents: false
|
||||||
|
update:
|
||||||
|
days: 1
|
||||||
|
refresher:
|
||||||
|
refreshInterval: 5
|
||||||
|
fetchInterval: 30
|
||||||
|
disableStartupPopups: true
|
||||||
|
customCommands:
|
||||||
|
- key: b
|
||||||
|
command: "git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d"
|
||||||
|
context: "localBranches"
|
||||||
|
loadingText: "Pruning..."
|
||||||
|
description: "prune local branches that have been merged to master"
|
||||||
|
- key: "<c-v>"
|
||||||
|
context: "global"
|
||||||
|
description: "Create new conventional commit"
|
||||||
|
prompts:
|
||||||
|
- type: "menu"
|
||||||
|
key: "Type"
|
||||||
|
title: "Type of change"
|
||||||
|
options:
|
||||||
|
- name: "build"
|
||||||
|
description: "Changes that affect the build system or external dependencies"
|
||||||
|
value: "build"
|
||||||
|
- name: "feat"
|
||||||
|
description: "A new feature"
|
||||||
|
value: "feat"
|
||||||
|
- name: "fix"
|
||||||
|
description: "A bug fix"
|
||||||
|
value: "fix"
|
||||||
|
- name: "chore"
|
||||||
|
description: "Other changes that don't modify src or test files"
|
||||||
|
value: "chore"
|
||||||
|
- name: "ci"
|
||||||
|
description: "Changes to CI configuration files and scripts"
|
||||||
|
value: "ci"
|
||||||
|
- name: "docs"
|
||||||
|
description: "Documentation only 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"
|
||||||
|
- name: "test"
|
||||||
|
description: "Adding missing tests or correcting existing tests"
|
||||||
|
value: "test"
|
||||||
|
- type: "input"
|
||||||
|
title: "Scope - Add '(<scope>)'"
|
||||||
|
key: "Scope"
|
||||||
|
initialValue: ""
|
||||||
|
- type: "input"
|
||||||
|
title: "Breaking change - Add '!'"
|
||||||
|
key: "Breaking"
|
||||||
|
initialValue: ""
|
||||||
|
- type: "input"
|
||||||
|
title: "message"
|
||||||
|
key: "Message"
|
||||||
|
initialValue: ""
|
||||||
|
- type: "confirm"
|
||||||
|
key: "Confirm"
|
||||||
|
title: "Commit"
|
||||||
|
body: "Are you sure you want to commit?"
|
||||||
|
command: "git commit --message '{{.Form.Type}}{{.Form.Scope}}{{.Form.Breaking}}: {{.Form.Message}}'"
|
||||||
|
loadingText: "Creating conventional commit..."
|
||||||
|
notARepository: skip
|
||||||
|
promptToReturnFromSubprocess: true
|
||||||
|
|
|
@ -41,11 +41,8 @@ cmd trash &{{
|
||||||
|
|
||||||
cmd lazygit ${{
|
cmd lazygit ${{
|
||||||
clear
|
clear
|
||||||
if ! git -C $PWD status >/dev/null 2>&1; then
|
dir="$(realpath $PWD)"
|
||||||
[ $(echo "Yes\nNo" | fzf --header="Not in a git repository. Create a new git repository? (y/n): ") = "Yes" ] && git init && lazygit
|
env PWD=$(realpath $PWD) lazygit
|
||||||
else
|
|
||||||
lazygit
|
|
||||||
fi
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
# y (select for copy) and P to paste soft-link
|
# y (select for copy) and P to paste soft-link
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue