mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-25 12:36:11 +03:00
add rc/dockerfile.kak
This commit is contained in:
parent
8342ad9574
commit
04fa164e2d
47
rc/dockerfile.kak
Normal file
47
rc/dockerfile.kak
Normal file
@ -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 '"' '(?<!\\)(\\\\)*"' '' \
|
||||||
|
string "'" "'" ''
|
||||||
|
|
||||||
|
addhl -group /dockerfile/instruction/regions/plain/regions/string fill string
|
||||||
|
|
||||||
|
addhl -group /dockerfile/instruction/regions/json ref json
|
||||||
|
addhl -group /dockerfile/instruction/regions/sh ref sh
|
||||||
|
|
||||||
|
addhl -group /dockerfile/comment fill comment
|
||||||
|
|
||||||
|
# Initialization
|
||||||
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
|
hook global WinSetOption filetype=dockerfile %{
|
||||||
|
addhl ref dockerfile
|
||||||
|
}
|
||||||
|
|
||||||
|
hook global WinSetOption filetype=(?!dockerfile).* %{
|
||||||
|
rmhl dockerfile
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user