1 | {
|
2 | "information_for_contributors": [
|
3 | "This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Commit%20Message.tmLanguage",
|
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/textmate/git.tmbundle/commit/93897a78c6e52bef13dadc0d4091d203c5facb40",
|
8 | "name": "Git Commit Message",
|
9 | "scopeName": "text.git-commit",
|
10 | "patterns": [
|
11 | {
|
12 | "begin": "\\A(?!# Please enter the commit message)",
|
13 | "end": "^(?=# Please enter the commit message)",
|
14 | "name": "meta.scope.message.git-commit",
|
15 | "patterns": [
|
16 | {
|
17 | "begin": "\\A(?=#)",
|
18 | "end": "^(?!#)",
|
19 | "patterns": [
|
20 | {
|
21 | "include": "#comment"
|
22 | }
|
23 | ]
|
24 | },
|
25 | {
|
26 | "begin": "^(?!# Please enter the commit message)",
|
27 | "end": "^(?=# Please enter the commit message)",
|
28 | "patterns": [
|
29 | {
|
30 | "begin": "\\G",
|
31 | "end": "^(?!\\G)",
|
32 | "name": "meta.scope.subject.git-commit",
|
33 | "patterns": [
|
34 | {
|
35 | "captures": {
|
36 | "1": {
|
37 | "name": "keyword.other.$2.git-commit"
|
38 | }
|
39 | },
|
40 | "match": "\\G((fixup|squash)!)\\s*"
|
41 | },
|
42 | {
|
43 | "match": ".{73,}$",
|
44 | "name": "invalid.illegal.line-too-long.git-commit"
|
45 | },
|
46 | {
|
47 | "match": ".{51,}$",
|
48 | "name": "invalid.deprecated.line-too-long.git-commit"
|
49 | }
|
50 | ]
|
51 | },
|
52 | {
|
53 | "begin": "^(?!# Please enter the commit message)",
|
54 | "end": "^(?=# Please enter the commit message)",
|
55 | "patterns": [
|
56 | {
|
57 | "include": "#comment"
|
58 | }
|
59 | ]
|
60 | }
|
61 | ]
|
62 | }
|
63 | ]
|
64 | },
|
65 | {
|
66 | "begin": "^(?=# Please enter the commit message)",
|
67 | "end": "\\z",
|
68 | "name": "meta.scope.metadata.git-commit",
|
69 | "patterns": [
|
70 | {
|
71 | "include": "#metadata"
|
72 | }
|
73 | ]
|
74 | }
|
75 | ],
|
76 | "repository": {
|
77 | "comment": {
|
78 | "begin": "^(#)",
|
79 | "captures": {
|
80 | "1": {
|
81 | "name": "punctuation.definition.comment.git-commit"
|
82 | }
|
83 | },
|
84 | "end": "\\n",
|
85 | "name": "comment.line.number-sign.git-commit"
|
86 | },
|
87 | "metadata": {
|
88 | "patterns": [
|
89 | {
|
90 | "begin": "(?=^# Changes to be committed:)",
|
91 | "end": "(?!\\G)((?=^# \\w)|(?!^#))",
|
92 | "patterns": [
|
93 | {
|
94 | "begin": "(^[ \\t]+)?(?=#)",
|
95 | "beginCaptures": {
|
96 | "1": {
|
97 | "name": "punctuation.whitespace.comment.leading.git-commit"
|
98 | }
|
99 | },
|
100 | "contentName": "comment.line.number-sign.git-commit",
|
101 | "end": "(?!\\G)^",
|
102 | "patterns": [
|
103 | {
|
104 | "match": "\\G#",
|
105 | "name": "punctuation.definition.comment.git-commit"
|
106 | },
|
107 | {
|
108 | "match": "((modified|renamed):.*)$\\n?",
|
109 | "name": "markup.changed.git-commit"
|
110 | },
|
111 | {
|
112 | "match": "(new file:.*)$\\n?",
|
113 | "name": "markup.inserted.git-commit"
|
114 | },
|
115 | {
|
116 | "match": "(deleted:.*)$\\n?",
|
117 | "name": "markup.deleted.git-commit"
|
118 | }
|
119 | ]
|
120 | }
|
121 | ]
|
122 | },
|
123 | {
|
124 | "include": "#comment"
|
125 | },
|
126 | {
|
127 | "begin": "(?=diff\\ \\-\\-git)",
|
128 | "comment": "diff presented at the end of the commit message when using commit -v.",
|
129 | "contentName": "source.diff",
|
130 | "end": "\\z",
|
131 | "name": "meta.embedded.diff.git-commit",
|
132 | "patterns": [
|
133 | {
|
134 | "include": "source.diff"
|
135 | }
|
136 | ]
|
137 | }
|
138 | ]
|
139 | }
|
140 | }
|
141 | } |
\ | No newline at end of file |