Browse code

Update Dockerfile highlight definitions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2016/06/06 00:45:21
Showing 4 changed files
... ...
@@ -9,23 +9,25 @@
9 9
           license="GPL">
10 10
   <highlighting>
11 11
     <list name="keywords">
12
+      <item> ADD </item>
13
+      <item> ARG </item>
14
+      <item> CMD </item>
15
+      <item> COPY </item>
16
+      <item> ENTRYPOINT </item>
17
+      <item> ENV </item>
18
+      <item> EXPOSE </item>
12 19
       <item> FROM </item>
20
+      <item> HEALTHCHECK </item>
21
+      <item> LABEL </item>
13 22
       <item> MAINTAINER </item>
14
-      <item> ENV </item>
15
-      <item> RUN </item>
16 23
       <item> ONBUILD </item>
17
-      <item> COPY </item>
18
-      <item> ADD </item>
24
+      <item> RUN </item>
25
+      <item> SHELL </item>
26
+      <item> STOPSIGNAL </item>
27
+      <item> USER </item>
19 28
       <item> VOLUME </item>
20
-      <item> EXPOSE </item>
21
-      <item> ENTRYPOINT </item>
22
-      <item> CMD </item>
23 29
       <item> WORKDIR </item>
24
-      <item> USER </item>
25
-      <item> LABEL </item>
26
-      <item> STOPSIGNAL </item>
27 30
     </list>
28
-
29 31
     <contexts>
30 32
       <context name="normal" attribute="Normal" lineEndContext="#stay">
31 33
         <DetectSpaces/>
... ...
@@ -35,23 +37,19 @@
35 35
         <DetectChar attribute="String" context="string&quot;" char="&quot;"/>
36 36
         <DetectChar attribute="String" context="string'" char="'"/>
37 37
       </context>
38
-
39 38
       <context attribute="Comment" lineEndContext="#pop" name="Comment">
40 39
         <LineContinue attribute="Comment" context="#stay" />
41 40
       </context>
42
-
43 41
       <context name="string&quot;" attribute="String" lineEndContext="#pop">
44 42
         <LineContinue attribute="Operator" context="#stay"/>
45 43
         <DetectChar attribute="String" context="#pop" char="&quot;"/>
46 44
         <DetectChar attribute="Operator" context="dollar" char="$"/>
47 45
       </context>
48
-
49 46
       <context name="string'" attribute="String" lineEndContext="#pop">
50 47
         <LineContinue attribute="String" context="#stay"/>
51 48
         <DetectChar attribute="String" context="#pop" char="'"/>
52 49
         <DetectChar attribute="Operator" context="dollar" char="$"/>
53 50
       </context>
54
-
55 51
     </contexts>
56 52
     <itemDatas>
57 53
       <itemData name="Normal"    defStyleNum="dsNormal" spellChecking="0"/>
... ...
@@ -67,4 +65,3 @@
67 67
   </general>
68 68
 </language>
69 69
 <!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
70
-
... ...
@@ -2,7 +2,7 @@
2 2
 syntax "Dockerfile" "Dockerfile[^/]*$"
3 3
 
4 4
 ## Keywords
5
-icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)[[:space:]]"
5
+icolor red "^(ONBUILD\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)[[:space:]]"
6 6
 
7 7
 ## Brackets & parenthesis
8 8
 color brightgreen "(\(|\)|\[|\])"
... ...
@@ -25,7 +25,7 @@
25 25
 				</dict>
26 26
 			</dict>
27 27
 			<key>match</key>
28
-			<string>^\s*(?:(ONBUILD)\s+)?(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|USER|WORKDIR|COPY|LABEL|STOPSIGNAL|ARG)\s</string>
28
+			<string>^\s*(?:(ONBUILD)\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)\s</string>
29 29
 		</dict>
30 30
 		<dict>
31 31
 			<key>captures</key>
... ...
@@ -11,7 +11,7 @@ let b:current_syntax = "dockerfile"
11 11
 
12 12
 syntax case ignore
13 13
 
14
-syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|LABEL|VOLUME|WORKDIR|COPY|STOPSIGNAL|ARG)\s/
14
+syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)\s/
15 15
 highlight link dockerfileKeyword Keyword
16 16
 
17 17
 syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/