chore: add lazygit config to readme and example config to repo

docs: typo
This commit is contained in:
Slug-Boi
2025-01-27 11:05:57 +01:00
parent b4be9fb978
commit 09ece70b12
2 changed files with 42 additions and 0 deletions
+24
View File
@@ -100,6 +100,30 @@ $ cocommit cz -c
```
This should allow for all the same utility as the normal CLI mode in terms of author selection
### Lazygit Config
If you use lazygit you can add the following to your lazygit config file to use cocommit:
```
customCommands:
- key: '<c-A>'
context: 'global'
showOutput: true
prompts:
- type: 'input'
title: 'Commit message'
key: 'message'
initialValue: ''
- type: 'input'
title: 'Authors'
key: 'authors'
initialValue: ''
command: 'cocommit -p "{{.Form.message}}" {{.Form.authors}}'
- key: '<c-a>'
context: 'global'
subprocess: true
command: 'cocommit -p; exit'
```
A sample lazygit config file can be found [here](https://github.com/Slug-Boi/cocommit/blob/main/lazygit_config/config.yml)
# Syntax for the author file
The syntax for the author file can be found at the top of the template file included in the repo. It should look like this (opt) is optional syntax:
```
+18
View File
@@ -0,0 +1,18 @@
customCommands:
- key: '<c-A>'
context: 'global'
showOutput: true
prompts:
- type: 'input'
title: 'Commit message'
key: 'message'
initialValue: ''
- type: 'input'
title: 'Authors'
key: 'authors'
initialValue: ''
command: 'cocommit -p "{{.Form.message}}" {{.Form.authors}}'
- key: '<c-a>'
context: 'global'
subprocess: true
command: 'cocommit -p; exit'