mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-11-27 23:11:20 +08:00
c115a5d47a
- Highlight Elvish code blocks in Markdown. - Highlight Elvish transcripts, either in .ttyshot files or in Markdown code blocks. - Remove the syntaxes directory in repo root now that the syntaxes live inside vscode/syntaxes. - Bump VS Code extension version to 0.1.2.
74 lines
1.7 KiB
JSON
74 lines
1.7 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
"scopeName": "source.elvish.in.markdown",
|
|
"injectionSelector": "L:text.html.markdown",
|
|
"patterns": [
|
|
{
|
|
"name": "markup.fenced_code.block.markdown",
|
|
"begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:(elvish)((\\s+|:|,|\\{|\\?)[^`~]*)?$)",
|
|
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
|
|
"beginCaptures": {
|
|
"3": {
|
|
"name": "punctuation.definition.markdown"
|
|
},
|
|
"4": {
|
|
"name": "fenced_code.block.language.markdown"
|
|
},
|
|
"5": {
|
|
"name": "fenced_code.block.language.attributes.markdown"
|
|
}
|
|
},
|
|
"endCaptures": {
|
|
"3": {
|
|
"name": "punctuation.definition.markdown"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"begin": "(^|\\G)(\\s*)(.*)",
|
|
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
|
|
"contentName": "meta.embedded.block.elvish",
|
|
"patterns": [
|
|
{
|
|
"include": "source.elvish"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "markup.fenced_code.block.markdown",
|
|
"begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:(elvish-transcript)((\\s+|:|,|\\{|\\?)[^`~]*)?$)",
|
|
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
|
|
"beginCaptures": {
|
|
"3": {
|
|
"name": "punctuation.definition.markdown"
|
|
},
|
|
"4": {
|
|
"name": "fenced_code.block.language.markdown"
|
|
},
|
|
"5": {
|
|
"name": "fenced_code.block.language.attributes.markdown"
|
|
}
|
|
},
|
|
"endCaptures": {
|
|
"3": {
|
|
"name": "punctuation.definition.markdown"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"begin": "(^|\\G)(\\s*)(.*)",
|
|
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
|
|
"contentName": "meta.embedded.block.elvish-transcript",
|
|
"patterns": [
|
|
{
|
|
"include": "source.elvish-transcript"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|