File: git-commit.yaml

package info (click to toggle)
micro 2.0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,828 kB
  • sloc: sh: 247; makefile: 77; xml: 53
file content (35 lines) | stat: -rw-r--r-- 1,194 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
filetype: git-commit

detect:
    filename: "^(.*[\\/])?(COMMIT_EDITMSG|TAG_EDITMSG|MERGE_MSG)$"

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:"
    - 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"
    # Color keywords for closing issues (such as on Github)
    - type.keyword: "\\b(?i)((fix(es|ed)?|close(s|d)?) #[0-9]+)\\b"

    # Comments
    - comment.line:
        start: "^#"
        end: "$"
        rules: []

    # Diffs (i.e. git commit --verbose)
    - default:
        start: "^diff --git"
        # Diff output puts a space before file contents on each line so this
        # should never match valid diff output and extend highlighting to the
        # end of the file
        end: "^ENDOFFILE"
        rules:
            - include: "patch"