| 1 |
filetype: git-commit |
| 2 |
|
| 3 |
detect: |
| 4 |
filename: "^(.*[\\/])?(COMMIT_EDITMSG|TAG_EDITMSG|MERGE_MSG)$" |
| 5 |
|
| 6 |
rules: |
| 7 |
# File changes |
| 8 |
- type.keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*" |
| 9 |
- type.keyword: "#[[:space:]]deleted:" |
| 10 |
- type.keyword: "#[[:space:]]modified:" |
| 11 |
- type.keyword: "#[[:space:]]new file:" |
| 12 |
- type.keyword: "#[[:space:]]renamed:" |
| 13 |
- type.keyword: "^#[[:space:]]Changes.*[:]" |
| 14 |
- type.keyword: "^#[[:space:]]Your branch and '[^']+" |
| 15 |
- type.keyword: "^#[[:space:]]Your branch and '" |
| 16 |
- type.keyword: "^#[[:space:]]On branch [^ ]+" |
| 17 |
- type.keyword: "^#[[:space:]]On branch" |
| 18 |
# Color keywords for closing issues (such as on Github) |
| 19 |
- type.keyword: "\\b(?i)((fix(es|ed)?|close(s|d)?) #[0-9]+)\\b" |
| 20 |
|
| 21 |
# Comments |
| 22 |
- comment.line: |
| 23 |
start: "^#" |
| 24 |
end: "$" |
| 25 |
rules: [] |
| 26 |
|
| 27 |
# Diffs (i.e. git commit --verbose) |
| 28 |
- default: |
| 29 |
start: "^diff --git" |
| 30 |
# Diff output puts a space before file contents on each line so this |
| 31 |
# should never match valid diff output and extend highlighting to the |
| 32 |
# end of the file |
| 33 |
end: "^ENDOFFILE" |
| 34 |
rules: |
| 35 |
- include: "patch" |