mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update Dockerfile highlight definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
0f13b69fe2
commit
4cb71f8082
4 changed files with 17 additions and 20 deletions
|
@ -9,23 +9,25 @@
|
|||
license="GPL">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item> FROM </item>
|
||||
<item> MAINTAINER </item>
|
||||
<item> ENV </item>
|
||||
<item> RUN </item>
|
||||
<item> ONBUILD </item>
|
||||
<item> COPY </item>
|
||||
<item> ADD </item>
|
||||
<item> VOLUME </item>
|
||||
<item> EXPOSE </item>
|
||||
<item> ENTRYPOINT </item>
|
||||
<item> ARG </item>
|
||||
<item> CMD </item>
|
||||
<item> WORKDIR </item>
|
||||
<item> USER </item>
|
||||
<item> COPY </item>
|
||||
<item> ENTRYPOINT </item>
|
||||
<item> ENV </item>
|
||||
<item> EXPOSE </item>
|
||||
<item> FROM </item>
|
||||
<item> HEALTHCHECK </item>
|
||||
<item> LABEL </item>
|
||||
<item> MAINTAINER </item>
|
||||
<item> ONBUILD </item>
|
||||
<item> RUN </item>
|
||||
<item> SHELL </item>
|
||||
<item> STOPSIGNAL </item>
|
||||
<item> USER </item>
|
||||
<item> VOLUME </item>
|
||||
<item> WORKDIR </item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context name="normal" attribute="Normal" lineEndContext="#stay">
|
||||
<DetectSpaces/>
|
||||
|
@ -35,23 +37,19 @@
|
|||
<DetectChar attribute="String" context="string"" char="""/>
|
||||
<DetectChar attribute="String" context="string'" char="'"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
||||
<LineContinue attribute="Comment" context="#stay" />
|
||||
</context>
|
||||
|
||||
<context name="string"" attribute="String" lineEndContext="#pop">
|
||||
<LineContinue attribute="Operator" context="#stay"/>
|
||||
<DetectChar attribute="String" context="#pop" char="""/>
|
||||
<DetectChar attribute="Operator" context="dollar" char="$"/>
|
||||
</context>
|
||||
|
||||
<context name="string'" attribute="String" lineEndContext="#pop">
|
||||
<LineContinue attribute="String" context="#stay"/>
|
||||
<DetectChar attribute="String" context="#pop" char="'"/>
|
||||
<DetectChar attribute="Operator" context="dollar" char="$"/>
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal" defStyleNum="dsNormal" spellChecking="0"/>
|
||||
|
@ -67,4 +65,3 @@
|
|||
</general>
|
||||
</language>
|
||||
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
syntax "Dockerfile" "Dockerfile[^/]*$"
|
||||
|
||||
## Keywords
|
||||
icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)[[:space:]]"
|
||||
icolor red "^(ONBUILD\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)[[:space:]]"
|
||||
|
||||
## Brackets & parenthesis
|
||||
color brightgreen "(\(|\)|\[|\])"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^\s*(?:(ONBUILD)\s+)?(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|USER|WORKDIR|COPY|LABEL|STOPSIGNAL|ARG)\s</string>
|
||||
<string>^\s*(?:(ONBUILD)\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)\s</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
|
|
|
@ -11,7 +11,7 @@ let b:current_syntax = "dockerfile"
|
|||
|
||||
syntax case ignore
|
||||
|
||||
syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|LABEL|VOLUME|WORKDIR|COPY|STOPSIGNAL|ARG)\s/
|
||||
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/
|
||||
highlight link dockerfileKeyword Keyword
|
||||
|
||||
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
|
||||
|
|
Loading…
Reference in a new issue