syntax: yaml: colorize the two known directives
See https://yaml.org/spec/1.2.2/#68-directives. Also, recognize a Yaml file from a %YAML directive on the first line.master
parent
bb8f40989f
commit
f545735638
|
@ -4,7 +4,7 @@
|
||||||
## License: GPL version 3 or newer
|
## License: GPL version 3 or newer
|
||||||
|
|
||||||
syntax yaml "\.ya?ml$"
|
syntax yaml "\.ya?ml$"
|
||||||
header "^---( |$)"
|
header "^%YAML |^---( |$)"
|
||||||
|
|
||||||
tabgives " "
|
tabgives " "
|
||||||
comment "#"
|
comment "#"
|
||||||
|
@ -26,7 +26,8 @@ color lightmagenta "("([^"]|\\")+"|'[^']+')"
|
||||||
color pink " [&*](\w|-)+( |$)"
|
color pink " [&*](\w|-)+( |$)"
|
||||||
|
|
||||||
# Symbols:
|
# Symbols:
|
||||||
color bold,lagoon "^(---|\.\.\.)( |$)" " [|>]([1-9]?[+-]|[+-][1-9]?)?$"
|
color bold,lagoon "^(%YAML +[1-9]\.[0-9]$|%TAG |(---|\.\.\.)( |$))"
|
||||||
|
color bold,lagoon " [|>]([1-9]?[+-]|[+-][1-9]?)?$"
|
||||||
color bold,yellow "^ *(\?|([?:] +)?-) "
|
color bold,yellow "^ *(\?|([?:] +)?-) "
|
||||||
color yellow "[]{}[]"
|
color yellow "[]{}[]"
|
||||||
color normal "^ *: "
|
color normal "^ *: "
|
||||||
|
|
Loading…
Reference in New Issue