Add .yml syntax hilighting. Closes #92027.
This commit is contained in:
parent
8192262a14
commit
ea91347c6b
2 changed files with 90 additions and 0 deletions
|
@ -55,6 +55,7 @@ const mappings = [
|
|||
['vb', 'source.asp.vb.net'],
|
||||
['xml', 'text.xml'],
|
||||
['yaml', 'source.yaml'],
|
||||
['yml', 'source.yaml'],
|
||||
];
|
||||
|
||||
const scopes = {
|
||||
|
|
|
@ -240,6 +240,9 @@
|
|||
{
|
||||
"include": "#yaml"
|
||||
},
|
||||
{
|
||||
"include": "#yml"
|
||||
},
|
||||
{
|
||||
"match": "^(?!\\s)(.*?)([^\\\\\\/\\n]*)(:)$",
|
||||
"name": "meta.resultBlock.search string meta.path.search",
|
||||
|
@ -4921,6 +4924,92 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"yml": {
|
||||
"name": "meta.resultBlock.search",
|
||||
"begin": "^(?!\\s)(.*?)([^\\\\\\/\\n]*\\.yml)(:)$",
|
||||
"end": "^(?!\\s)",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "string meta.path.search"
|
||||
},
|
||||
"1": {
|
||||
"name": "meta.path.dirname.search"
|
||||
},
|
||||
"2": {
|
||||
"name": "meta.path.basename.search"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.separator"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.resultLine.search meta.resultLine.multiLine.search",
|
||||
"begin": "^ (?:\\s*)((\\d+) )",
|
||||
"while": "^ (?:\\s*)(?:((\\d+)(:))|((\\d+) ))",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "constant.numeric.integer meta.resultLinePrefix.search"
|
||||
},
|
||||
"1": {
|
||||
"name": "meta.resultLinePrefix.contextLinePrefix.search"
|
||||
},
|
||||
"2": {
|
||||
"name": "meta.resultLinePrefix.lineNumber.search"
|
||||
}
|
||||
},
|
||||
"whileCaptures": {
|
||||
"0": {
|
||||
"name": "constant.numeric.integer meta.resultLinePrefix.search"
|
||||
},
|
||||
"1": {
|
||||
"name": "meta.resultLinePrefix.matchLinePrefix.search"
|
||||
},
|
||||
"2": {
|
||||
"name": "meta.resultLinePrefix.lineNumber.search"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.separator"
|
||||
},
|
||||
"4": {
|
||||
"name": "meta.resultLinePrefix.contextLinePrefix.search"
|
||||
},
|
||||
"5": {
|
||||
"name": "meta.resultLinePrefix.lineNumber.search"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.yaml"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "^ (?:\\s*)((\\d+)(:))",
|
||||
"while": "(?=not)possible",
|
||||
"name": "meta.resultLine.search meta.resultLine.singleLine.search",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "constant.numeric.integer meta.resultLinePrefix.search"
|
||||
},
|
||||
"1": {
|
||||
"name": "meta.resultLinePrefix.matchLinePrefix.search"
|
||||
},
|
||||
"2": {
|
||||
"name": "meta.resultLinePrefix.lineNumber.search"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.separator"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.yaml"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue