Skip to content

Commit 3ee4cc9

Browse files
committed
Add other random languages
1 parent 234b0a2 commit 3ee4cc9

File tree

4 files changed

+96
-2
lines changed

4 files changed

+96
-2
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"version": "0.2.0",
77
"configurations": [
88
{
9-
"name": "package.json Extension",
9+
"name": "JSON Embeds Extension",
1010
"type": "extensionHost",
1111
"request": "launch",
1212
"args": [

package.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "json-embedded-languages",
33
"displayName": "JSON Embedded Languages",
4-
"description": "Embed Language(s) into JSON",
4+
"description": "Embedded Language(s) inside JSON",
55
"publisher": "RedCMD",
66
"version": "0.2.0",
77
"engines": {
@@ -46,6 +46,26 @@
4646
"injectTo": [
4747
"source.json"
4848
]
49+
},
50+
{
51+
"scopeName": "source.json.legacy_tox_ini",
52+
"path": "./syntaxes/legacy_tox_ini.tmLanguage.json",
53+
"embeddedLanguages": {
54+
"meta.embedded.ini": "ini"
55+
},
56+
"injectTo": [
57+
"source.json"
58+
]
59+
},
60+
{
61+
"scopeName": "source.json.sql",
62+
"path": "./syntaxes/test.query.sql.tmLanguage.json",
63+
"embeddedLanguages": {
64+
"meta.embedded.sql": "sql"
65+
},
66+
"injectTo": [
67+
"source.json"
68+
]
4969
}
5070
]
5171
},
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json",
3+
"comment": "https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/pyproject.json",
4+
"name": "json.legacy_tox_ini",
5+
"scopeName": "source.json.legacy_tox_ini",
6+
"injectionSelector": "L:source.json .tool. .tox. .legacy_tox_ini. meta.structure.dictionary.value.json -(meta.structure.dictionary.json meta.structure.dictionary.json meta.structure.dictionary.json meta.structure.dictionary.json) -meta.structure.array.json -string -comment",
7+
"patterns": [
8+
{ "include": "#legacy_tox_ini" }
9+
],
10+
"repository": {
11+
"legacy_tox_ini": {
12+
"patterns": [
13+
{
14+
"comment": "VSCode TextMate bug. For some reason, including a grammar from within a capture group doesn't load the include. We have to pre-load the include outside of a capture group. `source.ini`",
15+
"begin": "(*FAIL)",
16+
"end": "|",
17+
"patterns": [ { "include": "source.ini" } ]
18+
},
19+
{
20+
"match": "(\")((?>[^\\\\\"]++|\\\\.)++)(\")",
21+
"captures": {
22+
"0": { "name": "string.quoted.double.json" },
23+
"1": { "name": "punctuation.definition.string.begin.json" },
24+
"2": {
25+
"name": "meta.embedded.ini.json",
26+
"patterns": [
27+
{ "include": "source.ini" },
28+
{ "include": "source.json#stringcontent" }
29+
]
30+
},
31+
"3": { "name": "punctuation.definition.string.end.json" }
32+
}
33+
}
34+
]
35+
}
36+
}
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json",
3+
"comment": "https://github.com/omnigres/omnigres/blob/master/pg_yregress/schema.json#L190",
4+
"name": "json.query",
5+
"scopeName": "source.json.sql",
6+
"injectionSelector": "L:source.json .test. .query. meta.structure.dictionary.value.json -(meta.structure.dictionary.json meta.structure.dictionary.json meta.structure.dictionary.json) -meta.structure.array.json -string -comment",
7+
"patterns": [
8+
{ "include": "#query" }
9+
],
10+
"repository": {
11+
"query": {
12+
"patterns": [
13+
{
14+
"comment": "VSCode TextMate bug. For some reason, including a grammar from within a capture group doesn't load the include. We have to pre-load the include outside of a capture group. https://github.com/microsoft/vscode-textmate/issues/242",
15+
"begin": "(*FAIL)",
16+
"end": "|",
17+
"patterns": [ { "include": "source.sql" } ]
18+
},
19+
{
20+
"match": "(\")((?>[^\\\\\"]++|\\\\.)++)(\")",
21+
"captures": {
22+
"0": { "name": "string.quoted.double.json" },
23+
"1": { "name": "punctuation.definition.string.begin.json" },
24+
"2": {
25+
"name": "meta.embedded.sql.json",
26+
"patterns": [
27+
{ "include": "source.sql" },
28+
{ "include": "source.json#stringcontent" }
29+
]
30+
},
31+
"3": { "name": "punctuation.definition.string.end.json" }
32+
}
33+
}
34+
]
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)