111 lines
2.4 KiB
JSON
111 lines
2.4 KiB
JSON
{
|
|
"scopeName": "source.prompttemplate",
|
|
"patterns": [
|
|
{
|
|
"name": "invalid.illegal.mismatched.prompttemplate",
|
|
"match": "\\{\\{\\{[^{}]*\\}\\}(?!\\})",
|
|
"captures": {
|
|
"0": {
|
|
"name": "invalid.illegal.bracket.mismatch"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "invalid.illegal.mismatched.prompttemplate",
|
|
"match": "\\{\\{[^{}]*\\}\\}\\}(?!\\})",
|
|
"captures": {
|
|
"0": {
|
|
"name": "invalid.illegal.bracket.mismatch"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "comment.block.prompttemplate",
|
|
"begin": "\\A{{!--",
|
|
"beginCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.comment.begin"
|
|
}
|
|
},
|
|
"end": "--}}",
|
|
"endCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.comment.end"
|
|
}
|
|
},
|
|
"patterns": []
|
|
},
|
|
{
|
|
"name": "variable.other.prompttemplate.double",
|
|
"begin": "\\{\\{",
|
|
"beginCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.variable.begin"
|
|
}
|
|
},
|
|
"end": "\\}\\}(?!\\})",
|
|
"endCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.variable.end"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"name": "keyword.control",
|
|
"match": "[a-zA-Z_][a-zA-Z0-9_]*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "variable.other.prompttemplate.triple",
|
|
"begin": "\\{\\{\\{",
|
|
"beginCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.variable.begin"
|
|
}
|
|
},
|
|
"end": "\\}\\}\\}(?!\\})",
|
|
"endCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.variable.end"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"name": "keyword.control",
|
|
"match": "[a-zA-Z_][a-zA-Z0-9_]*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "support.function.prompttemplate",
|
|
"begin": "~{",
|
|
"beginCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.brace.begin"
|
|
}
|
|
},
|
|
"end": "}",
|
|
"endCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.brace.end"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"name": "keyword.control",
|
|
"match": "[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"include": "text.html.markdown"
|
|
}
|
|
],
|
|
"repository": {},
|
|
"name": "PromptTemplate",
|
|
"fileTypes": [
|
|
".prompttemplate"
|
|
]
|
|
}
|