Browse code

Various cleanups added to asbjornenge/Docker.tmbundle (by the TM maintainer) and support for the LABEL instruction

Docker-DCO-1.1-Signed-off-by: Asbjorn Enge <asbjorn@hanafjedle.net> (github: asbjornenge)

Asbjørn Enge authored on 2015/06/15 07:04:05
Showing 1 changed files
... ...
@@ -1,54 +1,70 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 3
 <plist version="1.0">
4 4
 <dict>
5
-	<key>name</key>
6
-	<string>Dockerfile</string>
7 5
 	<key>fileTypes</key>
8 6
 	<array>
9 7
 		<string>Dockerfile</string>
10 8
 	</array>
9
+	<key>name</key>
10
+	<string>Dockerfile</string>
11 11
 	<key>patterns</key>
12 12
 	<array>
13 13
 		<dict>
14
-			<key>match</key>
15
-			<string>^\s*(ONBUILD\s+)?(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|USER|LABEL|WORKDIR|COPY)\s</string>
16 14
 			<key>captures</key>
17 15
 			<dict>
18
-				<key>0</key>
16
+				<key>1</key>
19 17
 				<dict>
20 18
 					<key>name</key>
21 19
 					<string>keyword.control.dockerfile</string>
22 20
 				</dict>
23
-				<key>1</key>
21
+				<key>2</key>
24 22
 				<dict>
25 23
 					<key>name</key>
26 24
 					<string>keyword.other.special-method.dockerfile</string>
27 25
 				</dict>
28 26
 			</dict>
27
+			<key>match</key>
28
+			<string>^\s*(?:(ONBUILD)\s+)?(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|USER|WORKDIR|COPY|LABEL)\s</string>
29 29
 		</dict>
30 30
 		<dict>
31
-			<key>match</key>
32
-			<string>^\s*(ONBUILD\s+)?(CMD|ENTRYPOINT)\s</string>
33 31
 			<key>captures</key>
34 32
 			<dict>
35
-				<key>0</key>
33
+				<key>1</key>
36 34
 				<dict>
37 35
 					<key>name</key>
38 36
 					<string>keyword.operator.dockerfile</string>
39 37
 				</dict>
40
-				<key>1</key>
38
+				<key>2</key>
41 39
 				<dict>
42 40
 					<key>name</key>
43 41
 					<string>keyword.other.special-method.dockerfile</string>
44 42
 				</dict>
45 43
 			</dict>
44
+			<key>match</key>
45
+			<string>^\s*(?:(ONBUILD)\s+)?(CMD|ENTRYPOINT)\s</string>
46 46
 		</dict>
47 47
 		<dict>
48 48
 			<key>begin</key>
49 49
 			<string>"</string>
50
+			<key>beginCaptures</key>
51
+			<dict>
52
+				<key>1</key>
53
+				<dict>
54
+					<key>name</key>
55
+					<string>punctuation.definition.string.begin.dockerfile</string>
56
+				</dict>
57
+			</dict>
50 58
 			<key>end</key>
51 59
 			<string>"</string>
60
+			<key>endCaptures</key>
61
+			<dict>
62
+				<key>1</key>
63
+				<dict>
64
+					<key>name</key>
65
+					<string>punctuation.definition.string.end.dockerfile</string>
66
+				</dict>
67
+			</dict>
52 68
 			<key>name</key>
53 69
 			<string>string.quoted.double.dockerfile</string>
54 70
 			<key>patterns</key>
... ...
@@ -64,8 +80,24 @@
64 64
 		<dict>
65 65
 			<key>begin</key>
66 66
 			<string>'</string>
67
+			<key>beginCaptures</key>
68
+			<dict>
69
+				<key>1</key>
70
+				<dict>
71
+					<key>name</key>
72
+					<string>punctuation.definition.string.begin.dockerfile</string>
73
+				</dict>
74
+			</dict>
67 75
 			<key>end</key>
68 76
 			<string>'</string>
77
+			<key>endCaptures</key>
78
+			<dict>
79
+				<key>1</key>
80
+				<dict>
81
+					<key>name</key>
82
+					<string>punctuation.definition.string.end.dockerfile</string>
83
+				</dict>
84
+			</dict>
69 85
 			<key>name</key>
70 86
 			<string>string.quoted.single.dockerfile</string>
71 87
 			<key>patterns</key>
... ...
@@ -79,10 +111,28 @@
79 79
 			</array>
80 80
 		</dict>
81 81
 		<dict>
82
+			<key>captures</key>
83
+			<dict>
84
+				<key>1</key>
85
+				<dict>
86
+					<key>name</key>
87
+					<string>punctuation.whitespace.comment.leading.dockerfile</string>
88
+				</dict>
89
+				<key>2</key>
90
+				<dict>
91
+					<key>name</key>
92
+					<string>comment.line.number-sign.dockerfile</string>
93
+				</dict>
94
+				<key>3</key>
95
+				<dict>
96
+					<key>name</key>
97
+					<string>punctuation.definition.comment.dockerfile</string>
98
+				</dict>
99
+			</dict>
100
+			<key>comment</key>
101
+			<string>comment.line</string>
82 102
 			<key>match</key>
83
-			<string>^\s*#.*$</string>
84
-			<key>name</key>
85
-			<string>comment.block.dockerfile</string>
103
+			<string>^(\s*)((#).*$\n?)</string>
86 104
 		</dict>
87 105
 	</array>
88 106
 	<key>scopeName</key>