0
0

config.yml 5.5 KB

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