config.yml 4.7 KB

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