From 04fa164e2d235575e04f6ac8063c22a945c2b1d8 Mon Sep 17 00:00:00 2001 From: Alex Leferry 2 Date: Sat, 18 Jul 2015 22:58:24 +0200 Subject: [PATCH] add rc/dockerfile.kak --- rc/dockerfile.kak | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 rc/dockerfile.kak diff --git a/rc/dockerfile.kak b/rc/dockerfile.kak new file mode 100644 index 00000000..48874d65 --- /dev/null +++ b/rc/dockerfile.kak @@ -0,0 +1,47 @@ +# http://docker.com +# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + +# See https://docs.docker.com/reference/builder + +# Detection +# ‾‾‾‾‾‾‾‾‾ + +hook global BufCreate .*Dockerfile %{ + set buffer filetype dockerfile +} + +# Highlighters +# ‾‾‾‾‾‾‾‾‾‾‾‾ + +addhl -group / regions dockerfile \ + instruction '^(?i)(ONBUILD\h+)?(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR)' '$' '' \ + comment '#' '$' '' + +addhl -group /dockerfile/instruction regex '^(?i)(ONBUILD\h+)?(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR)' 0:keyword + +addhl -group /dockerfile/instruction regions regions \ + plain '^(?i)(ONBUILD\h+)?(LABEL|ENV)' '$' '' \ + json '^(?i)(ONBUILD\h+)?(RUN|CMD|ADD|COPY|ENTRYPOINT|VOLUME)\h+\[' \] \[ \ + sh '^(?i)(ONBUILD\h+)?(RUN|CMD|ENTRYPOINT)\h+([A-Z/a-z])+' '$' '' + +addhl -group /dockerfile/instruction/regions/plain regions regions \ + string '"' '(?