syntax highlighting for prompt files
This commit is contained in:
parent
46bb3a57a9
commit
863ddaf896
2 changed files with 71 additions and 0 deletions
64
extensions/vscode/media/prompt.tmLanguage.json
Normal file
64
extensions/vscode/media/prompt.tmLanguage.json
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"name": "Prompt",
|
||||
"scopeName": "source.prompt",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#at-references"
|
||||
},
|
||||
{
|
||||
"include": "#strings"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"at-references": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "entity.name.type.prompt",
|
||||
"match": "@\\S+"
|
||||
}
|
||||
]
|
||||
},
|
||||
"strings": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "string.quoted.double.prompt",
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.character.escape.prompt",
|
||||
"match": "\\\\."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "string.quoted.single.prompt",
|
||||
"begin": "'",
|
||||
"end": "'",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.character.escape.prompt",
|
||||
"match": "\\\\."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "comment.line.double-slash.prompt",
|
||||
"match": "//.*$"
|
||||
},
|
||||
{
|
||||
"name": "comment.block.prompt",
|
||||
"begin": "/\\*",
|
||||
"end": "\\*/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -76,6 +76,13 @@
|
|||
"configuration": "./prompt-file-language-configuration.json"
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
{
|
||||
"language": "promptLanguage",
|
||||
"scopeName": "source.prompt",
|
||||
"path": "./media/prompt.tmLanguage.json"
|
||||
}
|
||||
],
|
||||
"configuration": {
|
||||
"title": "Continue",
|
||||
"properties": {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue