Skip to content

Commit

Permalink
syntax highlighting for prompt files
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Nov 9, 2024
1 parent 46bb3a5 commit 863ddaf
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
64 changes: 64 additions & 0 deletions extensions/vscode/media/prompt.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -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": "\\*/"
}
]
}
}
}
7 changes: 7 additions & 0 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 863ddaf

Please sign in to comment.