config.yml 4.5 KB

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