micro/runtime/syntax/git-commit.yaml
sum01 f882248f41
Fix git-commit comment syntax
A comment in a git-commit must have the hash at the start of the line, instead of just anywhere in the line.
2017-12-22 20:02:43 -05:00

30 lines
864 B
YAML

filetype: git-commit
detect:
filename: "COMMIT_EDITMSG|TAG_EDITMSG"
rules:
# Commit message
- ignore: ".*"
# Comments
- comment:
start: "^#"
end: "$"
rules: []
# File changes
- type.keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
- type.keyword: "#[[:space:]]deleted:"
- type.keyword: "#[[:space:]]modified:"
- type.keyword: "#[[:space:]]new file:"
- type.keyword: "#[[:space:]]renamed:"
# Untracked filenames
- error: "^# [^/?*:;{}\\\\]+\\.[^/?*:;{}\\\\]+$"
- type.keyword: "^#[[:space:]]Changes.*[:]"
- type.keyword: "^#[[:space:]]Your branch and '[^']+"
- type.keyword: "^#[[:space:]]Your branch and '"
- type.keyword: "^#[[:space:]]On branch [^ ]+"
- type.keyword: "^#[[:space:]]On branch"
# Recolor hash symbols
- special: "#"