Midgard
d0699b3716
Require double space before tags and price, like in the plain text accounting format of ledger. This makes it easier to differentiate between prices mentioned in descriptions and the price for the dish.
92 lines
1.3 KiB
JSON
92 lines
1.3 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
"name": "HLDS",
|
|
"patterns": [
|
|
{
|
|
"include": "#tags"
|
|
},
|
|
{
|
|
"include": "#keywords"
|
|
},
|
|
{
|
|
"include": "#header"
|
|
},
|
|
{
|
|
"include": "#prices"
|
|
},
|
|
{
|
|
"include": "#indent"
|
|
},
|
|
{
|
|
"include": "#random"
|
|
}
|
|
],
|
|
"repository": {
|
|
"random": {
|
|
"patterns": [
|
|
{
|
|
"match": "#.*$",
|
|
"name": "markup.bold"
|
|
}
|
|
]
|
|
},
|
|
"tags": {
|
|
"patterns": [
|
|
{
|
|
"match": " +( +{[a-zA-Z-_]*})*",
|
|
"name": "markup.italic"
|
|
}
|
|
]
|
|
},
|
|
"indent": {
|
|
"patterns": [
|
|
{
|
|
"name": "variable.other",
|
|
"match": "\\t[-_a-zA-Z0-9]*:"
|
|
},
|
|
{
|
|
"name": "entity.name.type",
|
|
"match": "[-_a-zA-Z0-9]*:"
|
|
}
|
|
]
|
|
},
|
|
"prices": {
|
|
"patterns": [
|
|
{
|
|
"name": "entity.name.class",
|
|
"match": "€\\s*[0-9.]*$"
|
|
}
|
|
]
|
|
},
|
|
"header": {
|
|
"patterns": [
|
|
{
|
|
"name": "embedded.meta.tag",
|
|
"begin": "^==",
|
|
"end": "==$"
|
|
}
|
|
]
|
|
},
|
|
"comments": {
|
|
"patterns": [
|
|
{
|
|
"name": "comment",
|
|
"match": "--[^€]*"
|
|
}
|
|
]
|
|
},
|
|
"keywords": {
|
|
"patterns": [
|
|
{
|
|
"name": "keyword.control.hlds",
|
|
"match": "\\bdish\\b"
|
|
},
|
|
{
|
|
"name": "keyword",
|
|
"match": "\\b(single_choice|multi_choice)\\b"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"scopeName": "source.hlds"
|
|
}
|