0
0

config.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
  2. # config.yml
  3. #
  4. # Docs:
  5. # * https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md
  6. ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
  7. gui:
  8. scrollPastBottom: false
  9. mouseEvents: false
  10. nerdFontsVersion: "3"
  11. border: "single"
  12. theme:
  13. inactiveBorderColor:
  14. - white
  15. activeBorderColor:
  16. - yellow
  17. - bold
  18. searchingActiveBorderColor:
  19. - cyan
  20. - bold
  21. selectedLineBgColor:
  22. - yellow
  23. git:
  24. overrideGpg: true
  25. commit:
  26. autoWrapCommitMessage: true
  27. autoWrapWidth: 72
  28. os:
  29. edit: "$DOTFILES_DIR/.scripts/lazygit_nvim_editor.zsh {{filename}}"
  30. editAtLine: "$DOTFILES_DIR/.scripts/lazygit_nvim_editor.zsh {{filename}} {{line}}"
  31. editAtLineAndWait: "$DOTFILES_DIR/.scripts/lazygit_nvim_editor.zsh {{filename}} {{line}}"
  32. editInTerminal: false
  33. refresher:
  34. refreshInterval: 2
  35. customCommands:
  36. - key: "<c-c>"
  37. context: "files"
  38. description: "Create a conventional commit"
  39. command: /usr/bin/env python3 $DOTFILES_DIR/.scripts/lazygit_add_conventional_commit.py "{{.Form.Type}}" "{{.Form.Scope}}" "{{.Form.Breaking}}" "{{.Form.Subject}}" "{{.Form.Breaking}}"
  40. prompts:
  41. - type: "menu"
  42. key: "Type"
  43. title: "Type"
  44. options:
  45. - name: "feat"
  46. description: "A new feature"
  47. value: "feat"
  48. - name: "fix"
  49. description: "A bug fix"
  50. value: "fix"
  51. - name: "test"
  52. description: "Adding missing tests or correcting existing tests"
  53. value: "test"
  54. - name: "chore"
  55. description:
  56. "Changes that do not modify the source code or test files"
  57. value: "chore"
  58. - name: " "
  59. description: ""
  60. value: "chore" # This line is just here for aesthetics, but should still have a valid value
  61. - name: "build"
  62. description:
  63. "Changes that affect the build system or external dependencies"
  64. value: "build"
  65. - name: "ci"
  66. description: "Changes to CI configuration files and scripts"
  67. value: "ci"
  68. - name: "docs"
  69. description: "Documentation changes"
  70. value: "docs"
  71. - name: "perf"
  72. description: "A code change that improves performance"
  73. value: "perf"
  74. - name: "refactor"
  75. description:
  76. "A code change that neither fixes a bug nor adds a feature"
  77. value: "refactor"
  78. - name: "revert"
  79. description: "Reverts a previous commit"
  80. value: "revert"
  81. - name: "style"
  82. description: "Changes that do not affect the meaning of the code"
  83. value: "style"
  84. - type: "input"
  85. key: "Scope"
  86. title: "Scope (optional)"
  87. suggestions:
  88. command: |
  89. git log --pretty='format:%s' | \
  90. rg '^\S+\((.*?)\)' -or '$1' | \
  91. cat -n | \
  92. sort -uk2 | \
  93. sort -n | \
  94. cut -f2-
  95. - type: "input"
  96. title: "Breaking Change (`no`, `yes`, or custom description)"
  97. key: "Breaking"
  98. initialValue: "no"
  99. suggestions:
  100. command: "echo yes"
  101. - type: "input"
  102. key: "Subject"
  103. # Did you know? The preference for the imperative mood is included in the Pro Git book!
  104. # https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project
  105. title: "Description (<= 50 characters, in imperative mood)"
  106. - type: "confirm"
  107. title: "Confirm"
  108. body: |
  109. {{.Form.Type}}: {{.Form.Subject}}
  110. Scope: {{.Form.Scope}}
  111. Breaking Change: {{.Form.Breaking}}
  112. - key: "<c-r>"
  113. context: "commits"
  114. description: "Set commit dates to author dates"
  115. command: git rebase "{{ .SelectedCommit.Sha }}^" --committer-date-is-author-date
  116. prompts:
  117. - type: "confirm"
  118. title: "Set commit dates to author dates"
  119. body: "Are you sure you want to set commit dates equal to author dates?"
  120. - key: "<c-a>"
  121. context: "commits"
  122. description: "Modify author date and commit date"
  123. command: /usr/bin/env python3 $DOTFILES_DIR/.scripts/lazygit_modify_commit_date.py commit "{{.SelectedLocalCommit.Sha}}" "{{.Form.Commit}}" "{{.Form.Timestamp}}"
  124. prompts:
  125. - type: "menu"
  126. title: "Commit"
  127. key: "Commit"
  128. options:
  129. - name: "Selected"
  130. description: "The selected commit"
  131. value: "selected"
  132. - name: "Following"
  133. description: "Selected and subsequent commits"
  134. value: "following"
  135. - type: "menuFromCommand"
  136. title: "Select Timestamp"
  137. key: "InitialValue"
  138. command: |
  139. bash -c "date \"+%Y-%m-%d %H:00:00 %z\";
  140. date \"+%Y-%m-%d %H:%M:%S %z\";
  141. git log --pretty=format:%ad --date=iso | uniq | head -1;
  142. echo \"- Past author dates:\";
  143. git log --pretty=format:%ad --date=iso | uniq | head -5;
  144. echo \"- Dummy timestamps:\";
  145. echo 2005-04-07 15:13:13 -0700;
  146. echo 0000-00-00 00:00:00 +0000;"
  147. - type: "input"
  148. title: "Edit Timestamp"
  149. key: "Timestamp"
  150. initialValue: "{{.Form.InitialValue}}"
  151. - type: "confirm"
  152. title: "Confirm"
  153. body: |
  154. Set author and commit dates for {{.Form.Commit}} commit "{{.SelectedLocalCommit.Name}}" ({{.SelectedLocalCommit.Sha}}) to "{{.Form.Timestamp}}"?'