-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
source.git-revlist.js
38 lines (36 loc) · 1017 Bytes
/
source.git-revlist.js
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
// 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-revision-list', 'git-blame-ignore-revs'],
patterns: [{include: '#main'}],
repository: {
comment: {
begin: '#',
beginCaptures: {0: {name: 'punctuation.definition.comment.git-revlist'}},
end: '$',
name: 'comment.line.number-sign.git-revlist'
},
invalid: {match: '\\S.*?(?=\\s*$)', name: 'invalid.illegal.git-revlist'},
main: {
patterns: [
{include: '#comment'},
{include: '#sha'},
{include: '#invalid'}
]
},
sha: {
match: '[0-9a-fA-F]{40}(?=\\s*$)',
name: 'constant.numeric.sha.git-revlist'
}
},
scopeName: 'source.git-revlist'
}
export default grammar