Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/git-base/syntaxes/git-commit.tmLanguage.json
3314 views
1
{
2
"information_for_contributors": [
3
"This file has been converted from https://github.com/walles/git-commit-message-plus/blob/master/syntaxes/git-commit.tmLanguage.json",
4
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5
"Once accepted there, we are happy to receive an update request."
6
],
7
"version": "https://github.com/walles/git-commit-message-plus/commit/35a079dea5a91b087021b40c01a6bb4eb0337a87",
8
"name": "Git Commit Message",
9
"scopeName": "text.git-commit",
10
"patterns": [
11
{
12
"comment": "diff presented at the end of the commit message when using commit -v.",
13
"name": "meta.embedded.diff.git-commit",
14
"contentName": "source.diff",
15
"begin": "(?=^diff\\ \\-\\-git)",
16
"end": "\\z",
17
"patterns": [
18
{
19
"include": "source.diff"
20
}
21
]
22
},
23
{
24
"comment": "User supplied message",
25
"name": "meta.scope.message.git-commit",
26
"begin": "^(?!#)",
27
"end": "^(?=#)",
28
"patterns": [
29
{
30
"comment": "Mark > 50 lines as deprecated, > 72 as illegal",
31
"name": "meta.scope.subject.git-commit",
32
"match": "\\G.{0,50}(.{0,22}(.*))$",
33
"captures": {
34
"1": {
35
"name": "invalid.deprecated.line-too-long.git-commit"
36
},
37
"2": {
38
"name": "invalid.illegal.line-too-long.git-commit"
39
}
40
}
41
}
42
]
43
},
44
{
45
"comment": "Git supplied metadata in a number of lines starting with #",
46
"name": "meta.scope.metadata.git-commit",
47
"begin": "^(?=#)",
48
"contentName": "comment.line.number-sign.git-commit",
49
"end": "^(?!#)",
50
"patterns": [
51
{
52
"match": "^#\\t((modified|renamed):.*)$",
53
"captures": {
54
"1": {
55
"name": "markup.changed.git-commit"
56
}
57
}
58
},
59
{
60
"match": "^#\\t(new file:.*)$",
61
"captures": {
62
"1": {
63
"name": "markup.inserted.git-commit"
64
}
65
}
66
},
67
{
68
"match": "^#\\t(deleted.*)$",
69
"captures": {
70
"1": {
71
"name": "markup.deleted.git-commit"
72
}
73
}
74
},
75
{
76
"comment": "Fallback for non-English git commit template",
77
"match": "^#\\t([^:]+): *(.*)$",
78
"captures": {
79
"1": {
80
"name": "keyword.other.file-type.git-commit"
81
},
82
"2": {
83
"name": "string.unquoted.filename.git-commit"
84
}
85
}
86
}
87
]
88
}
89
]
90
}
91