]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/yaml.yaml
Use new syntax highlighting engine from zyedidia/highlight
[micro.git] / runtime / syntax / yaml.yaml
1 filetype: yaml
2
3 detect:
4     filename: "\\.ya?ml$"
5     header: "%YAML"
6
7 rules:
8     - type: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
9     - constant:  "\\b(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\\b"
10     - constant: "\\b(true|false)\\b"
11     - statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )"
12     - identifier: "[[:space:]][\\*&][A-Za-z0-9]+"
13     - type: "([-\\w]+:\\s+)|([-\\w]+:$)"
14     - special:  "(^---|^\\.\\.\\.|^%YAML|^%TAG)"
15
16     - constant.string:
17         start: "\""
18         end: "\""
19         rules:
20             - constant.specialChar: "\\\\."
21
22     - constant.string:
23         start: "'"
24         end: "'"
25         rules:
26             - constant.specialChar: "\\\\."
27
28     - comment:
29         start: "#"
30         end: "$"
31         rules: []
32