提交 ea91347c 编写于 作者: J Jackson Kearl

Add .yml syntax hilighting. Closes #92027.

上级 8192262a
...@@ -55,6 +55,7 @@ const mappings = [ ...@@ -55,6 +55,7 @@ const mappings = [
['vb', 'source.asp.vb.net'], ['vb', 'source.asp.vb.net'],
['xml', 'text.xml'], ['xml', 'text.xml'],
['yaml', 'source.yaml'], ['yaml', 'source.yaml'],
['yml', 'source.yaml'],
]; ];
const scopes = { const scopes = {
......
...@@ -240,6 +240,9 @@ ...@@ -240,6 +240,9 @@
{ {
"include": "#yaml" "include": "#yaml"
}, },
{
"include": "#yml"
},
{ {
"match": "^(?!\\s)(.*?)([^\\\\\\/\\n]*)(:)$", "match": "^(?!\\s)(.*?)([^\\\\\\/\\n]*)(:)$",
"name": "meta.resultBlock.search string meta.path.search", "name": "meta.resultBlock.search string meta.path.search",
...@@ -4921,6 +4924,92 @@ ...@@ -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"
}
]
}
]
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册