-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
SideBarGitDiff.sublime-syntax
72 lines (62 loc) · 2.26 KB
/
SideBarGitDiff.sublime-syntax
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
64
65
66
67
68
69
70
71
72
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Diff Side Bar Git
file_extensions:
- diff
- patch
first_line_match: '(^\t git)'
scope: source.diff
contexts:
main:
- match: '^((\*{15})|(={67})|(-{3}))$\n?'
scope: meta.separator.diff
captures:
1: punctuation.definition.separator.diff
- match: ^\t\d+(,\d+)*(a|d|c)\d+(,\d+)*$\n?
scope: meta.diff.range.normal meta.range.normal.diff
- match: ^\t(@@)\s*(.+?)\s*(@@)\s*(.*?)\s*$\n?
scope: meta.diff.range.unified meta.range.unified.diff
captures:
1: punctuation.definition.range.diff
2: meta.toc-list.line-number.diff
3: punctuation.definition.range.diff
4: entity.name.section.diff
- match: '^(((\-{3}) .+ (\-{4}))|((\*{3}) .+ (\*{4})))$\n?'
scope: meta.diff.range.context meta.range.context.diff
captures:
3: punctuation.definition.range.diff
4: punctuation.definition.range.diff
6: punctuation.definition.range.diff
7: punctuation.definition.range.diff
- match: '(^(((-{3}) .+)|((\*{3}) .+))$\n?|^(={4}) .+(?= - ))'
scope: meta.diff.header.from-file meta.header.from-file.diff
captures:
4: punctuation.definition.from-file.diff
6: punctuation.definition.from-file.diff
7: punctuation.definition.from-file.diff
- match: '(^(\+{3}) .+$\n?| (-) .* (={4})$\n?)'
scope: meta.diff.header.to-file meta.header.to-file.diff
captures:
2: punctuation.definition.to-file.diff
3: punctuation.definition.to-file.diff
4: punctuation.definition.to-file.diff
- match: ^(((>)( .*)?)|(\t(\+).*))$\n?
scope: markup.inserted.diff
captures:
3: punctuation.definition.inserted.diff
6: punctuation.definition.inserted.diff
- match: ^(!).*$\n?
scope: markup.changed.diff
captures:
1: punctuation.definition.changed.diff
- match: ^(((<)( .*)?)|(\t(-).*))$\n?
scope: markup.deleted.diff
captures:
3: punctuation.definition.deleted.diff
6: punctuation.definition.deleted.diff
- match: ^\tIndex(:) (.+)$\n?
scope: meta.diff.index meta.index.diff
captures:
1: punctuation.separator.key-value.diff
2: meta.toc-list.file-name.diff