main dots / config / .config / micro / syntax / cook.yaml
xxwhirlpool  ·  2026-06-09
 1---
 2filetype: cook
 3
 4detect:
 5    filename: "\\.cook$"
 6    header: "^>>"
 7
 8rules:
 9    # Ingredients
10    - identifier: "@[A-Za-zÀ-ÖØ-öø-ÿ0-9\\- ]+{[^}]*}|@[A-Za-zÀ-ÖØ-öø-ÿ0-9\\-]+"
11
12    # Cookware
13    - type: "#[A-Za-zÀ-ÖØ-öø-ÿ\\- ]+{[^}]*}|#[A-Za-zÀ-ÖØ-öø-ÿ\\-]+"
14
15    # Timers
16    - constant.number:
17        start: "~\\{"  # yamllint disable-line rule:indentation
18        end: "\\}"
19        rules:
20            - symbol.operator: "(%|~)"
21            - constant.number: "\\b\\d+\\b"
22            - constant.string: "[A-Za-zÀ-ÖØ-öø-ÿ]+"
23
24    # Metadata
25    - constant.string:
26        start: "^>>"  # yamllint disable-line rule:indentation
27        end: "$"
28        rules:
29            - todo: "(TODO|XXX|FIXME)"
30            - identifier: "[A-Za-zÀ-ÖØ-öø-ÿ]+: "
31            - symbol.operator: "(>>|: )"
32
33
34    # Conditionals and control flow
35    - symbol.operator: "(@|#|~|%|°)"
36
37    # Brackets
38    - symbol.brackets: "(\\{|\\})"
39    - symbol.brackets: "(\\(|\\))"
40    - symbol.brackets: "(\\[|\\])"
41
42    # Numbers and strings
43    - constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
44
45    # Comments
46    - comment: "(\\[-.*-\\])"
47
48    - comment:
49        start: "-- "  # yamllint disable-line rule:indentation
50        end: "$"
51        rules:
52            - todo: "(TODO|XXX|FIXME):?"