add "prompt-basics" language extension

This commit is contained in:
Oleg Solomko
2025-04-10 12:47:26 -07:00
parent 0a94f8edc4
commit acf8d50456
6 changed files with 178 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
test/**
src/**
tsconfig.json
cgmanifest.json

View File

@@ -0,0 +1,4 @@
{
"registrations": [],
"version": 1
}

View File

@@ -0,0 +1,103 @@
{
"comments": {
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [
"<!--",
"-->"
]
},
// symbols used as brackets
"brackets": [
[
"{",
"}"
],
[
"[",
"]"
],
[
"(",
")"
]
],
"colorizedBracketPairs": [],
"autoClosingPairs": [
{
"open": "{",
"close": "}"
},
{
"open": "[",
"close": "]"
},
{
"open": "(",
"close": ")"
},
{
"open": "<",
"close": ">",
"notIn": [
"string"
]
},
],
"surroundingPairs": [
[
"(",
")"
],
[
"[",
"]"
],
[
"`",
"`"
],
[
"_",
"_"
],
[
"*",
"*"
],
[
"{",
"}"
],
[
"'",
"'"
],
[
"\"",
"\""
],
[
"<",
">"
],
[
"~",
"~"
],
[
"$",
"$"
]
],
"folding": {
"offSide": true,
"markers": {
"start": "^\\s*<!--\\s*#?region\\b.*-->",
"end": "^\\s*<!--\\s*#?endregion\\b.*-->"
}
},
"wordPattern": {
"pattern": "(\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark})(((\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark})|[_])?(\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark}))*",
"flags": "ug"
},
}

View File

@@ -0,0 +1,48 @@
{
"name": "prompt",
"displayName": "%displayName%",
"description": "%description%",
"version": "0.1.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.20.0"
},
"categories": ["Programming Languages"],
"contributes": {
"languages": [
{
"id": "prompt.md",
"aliases": [
"Prompt",
"prompt"
],
"extensions": [
".prompt.md",
"copilot-instructions.md"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "prompt.md",
"path": "./syntaxes/prompt.tmLanguage.json",
"scopeName": "text.html.markdown.prompt"
}
],
"configurationDefaults": {
"[prompt.md]": {
"editor.unicodeHighlight.ambiguousCharacters": false,
"editor.unicodeHighlight.invisibleCharacters": false,
"diffEditor.ignoreTrimWhitespace": false
}
}
},
"scripts": {},
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode.git"
}
}

View File

@@ -0,0 +1,4 @@
{
"displayName": "Prompt Language Basics",
"description": "Syntax highlighting for Prompt documents."
}

View File

@@ -0,0 +1,15 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/microsoft/vscode-markdown-tm-grammar/blob/master/syntaxes/markdown.tmLanguage",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "0.1.0",
"name": "Prompt",
"scopeName": "text.html.markdown.prompt",
"patterns": [
{
"include": "text.html.markdown"
}
]
}