syntax highlighting for prompt files

This commit is contained in:
Nate 2024-11-08 16:56:35 -08:00
parent 46bb3a57a9
commit 863ddaf896
2 changed files with 71 additions and 0 deletions

View 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": "\\*/"
}
]
}
}
}

View file

@ -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": {