-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathtext.git-commit.js
More file actions
63 lines (61 loc) · 1.89 KB
/
text.git-commit.js
File metadata and controls
63 lines (61 loc) · 1.89 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is developed at
// <https://github.com/Nixinova/NovaGrammars>
// and licensed `isc`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
extensions: [],
names: ['git-commit', 'commit'],
patterns: [{include: '#main'}],
repository: {
comment: {
begin: '^#',
beginCaptures: {0: {name: 'punctuation.definition.comment.git-commit'}},
end: '$',
name: 'comment.line.git-commit',
patterns: [
{
captures: {
1: {name: 'markup.changed.git-commit'},
3: {name: 'markup.bold.filename.git-commit'}
},
match: '(modified)(:) +(.+)',
name: 'meta.generic.variable.other.modified.git-commit'
},
{
captures: {
1: {name: 'markup.changed.git-commit'},
3: {name: 'markup.bold.filename.git-commit'},
4: {name: 'markup.raw.token.git-commit'},
5: {name: 'markup.bold.filename.git-commit'}
},
match: '(renamed)(:) +(.+)(->)(.+)',
name: 'meta.generic.variable.other.renamed.git-commit'
},
{
captures: {
1: {name: 'markup.deleted.git-commit'},
3: {name: 'markup.bold.filename.git-commit'}
},
match: '(deleted)(:) +(.+)',
name: 'meta.generic.variable.other.deleted.git-commit'
},
{
captures: {
1: {name: 'markup.inserted.git-commit'},
3: {name: 'markup.bold.filename.git-commit'}
},
match: '(new file)(:) +(.+)',
name: 'meta.generic.variable.other.new-file.git-commit'
}
]
},
main: {patterns: [{include: '#comment'}]}
},
scopeName: 'text.git-commit'
}
export default grammar