File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,32 @@ customCommands:
149149 labelFormat: "{{ .raw | green }}"
150150` ` `
151151
152+ This config will allows you to edit the commit message after picking from lazycommit suggestions.
153+ ` ` ` yaml
154+ - key: "<c-b>" # ctrl + b
155+ description: "Pick AI commit (edit before committing)"
156+ context: "files"
157+ command: >
158+ bash -c 'msg="{{.Form.Msg}}"; echo "$msg" > .git/COMMIT_EDITMSG && ${EDITOR:-nvim} .git/COMMIT_EDITMSG && if [ -s .git/COMMIT_EDITMSG ]; then
159+
160+ git commit -F .git/COMMIT_EDITMSG;
161+ else
162+
163+ echo "Commit message is empty, commit aborted.";
164+ fi'
165+
166+ prompts:
167+ - type: "menuFromCommand"
168+ title: "ai Commits"
169+ key: "Msg"
170+ command: "lazycommit commit"
171+ filter: '^(?P<raw>.+)$'
172+ valueFormat: "{{ .raw }}"
173+ labelFormat: "{{ .raw | green }}"
174+ output: terminal
175+ ` ` `
176+
177+
152178# # Troubleshooting
153179
154180- " No staged changes to commit." — run `git add` first.
You can’t perform that action at this time.
0 commit comments