]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/yaml.yaml
Ignore tool files
[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|TRUE|True|true|NO|no|N|n|OFF|off|FALSE|False|false)\\b"
10     - statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )"
11     - identifier: "[[:space:]][\\*&][A-Za-z0-9]+"
12     - type: "[-.\\w]+:"
13     - statement: ":"
14     - special:  "(^---|^\\.\\.\\.|^%YAML|^%TAG)"
15
16     - constant.string:
17         start: "(^| )\""
18         end: "\""
19         skip: "\\\\."
20         rules:
21             - constant.specialChar: "\\\\."
22
23     - constant.string:
24         start: "(^| )'"
25         end: "'"
26         skip: "(\\\\.)|('')"
27         rules:
28             - constant.specialChar: "\\\\."
29
30     - comment:
31         start: "#"
32         end: "$"
33         rules: []
34
35