Skip to content

Commit 37bb9c4

Browse files
committed
Add "folding", "onEnterRules" and "indentationRules" to language-configuration.json injection
1 parent 1397642 commit 37bb9c4

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

syntaxes/language-configuration.tmLanguage.json

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,31 @@
33
"comment": "https://github.com/wraith13/vscode-schemas/blob/master/en/latest/schemas/language-configuration.json#L237-L258",
44
"name": "language-configuration",
55
"scopeName": "source.json.comments.language-configuration",
6-
"injectionSelector": "L:source.json.comments .meta.embedded.wordPattern. meta.structure.dictionary.value.json.comments -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) -meta.structure.array.json.comments -string -comment, L:source.json.comments .meta.embedded.wordPattern. .meta.embedded.pattern. meta.structure.dictionary.value.json.comments -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) -meta.structure.array.json.comments -string -comment",
6+
"injectionSelector": [
7+
"L:source.json.comments .meta.embedded.wordPattern. (.meta.embedded.pattern. -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) | -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments)) meta.structure.dictionary.value.json.comments string.quoted.double.json.comments -meta.structure.array.json.comments -meta.embedded.json.textmate.regexp -comment",
8+
"L:source.json.comments .meta.embedded.folding. .meta.embedded.markers. (.meta.embedded.start. | .meta.embedded.end.) meta.structure.dictionary.value.json.comments string.quoted.double.json.comments -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) -meta.structure.array.json.comments -meta.embedded.json.textmate.regexp -comment",
9+
"L:source.json.comments .meta.embedded.onEnterRules. meta.structure.array.json.comments (.meta.embedded.afterText. | .meta.embedded.beforeText. | .meta.embedded.previousLineText.) (.meta.embedded.pattern. -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) | -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments)) meta.structure.dictionary.value.json.comments string.quoted.double.json.comments -(meta.structure.array.json.comments meta.structure.array.json.comments) -meta.embedded.json.textmate.regexp -comment",
10+
"L:source.json.comments .meta.embedded.indentationRules. (.meta.embedded.decreaseIndentPattern. | .meta.embedded.increaseIndentPattern. | .meta.embedded.unIndentedLinePattern. | .meta.embedded.indentNextLinePattern.) (.meta.embedded.pattern. -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) | -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments)) meta.structure.dictionary.value.json.comments string.quoted.double.json.comments -meta.structure.array.json.comments -meta.embedded.json.textmate.regexp -comment"
11+
],
712
"patterns": [
8-
{ "include": "#wordPattern" }
13+
{
14+
"comment": "https://github.com/microsoft/vscode-textmate/issues/242",
15+
"include": "source.json.textmate.regexp#_pre-load_"
16+
},
17+
{ "include": "#regexp" }
918
],
1019
"repository": {
11-
"wordPattern": {
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.json.textmate.regexp" } ]
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.json.textmate.regexp",
26-
"patterns": [
27-
{ "include": "source.json.textmate.regexp" },
28-
{ "include": "source.json#stringcontent" }
29-
]
30-
},
31-
"3": { "name": "punctuation.definition.string.end.json" }
32-
}
20+
"regexp": {
21+
"match": "(?<=\")\\G(?>[^\\\\\"\\x-\\x1F]++|\\\\.)++",
22+
"captures": {
23+
"0": {
24+
"name": "meta.embedded.json.textmate.regexp",
25+
"patterns": [
26+
{ "include": "source.json.textmate.regexp" },
27+
{ "include": "source.json.comments#stringcontent" }
28+
]
3329
}
34-
]
30+
}
3531
}
3632
}
3733
}

0 commit comments

Comments
 (0)