Skip to content

Commit ce7f99f

Browse files
authored
[XML] Use the same HTML language configuration for XML
This PR is a copy/paste of the HTML language configuration to have for instance autoClosingPairs for Comments and adds autoClosingPairs for CDATA.
1 parent 4deeb95 commit ce7f99f

1 file changed

Lines changed: 25 additions & 22 deletions

File tree

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
{
22
"comments": {
3-
"lineComment": "",
4-
"blockComment": ["<!--", "-->"]
3+
"blockComment": [ "<!--", "-->" ]
54
},
65
"brackets": [
7-
["<", ">"]
6+
["<!--", "-->"],
7+
["<", ">"],
8+
["{", "}"],
9+
["(", ")"]
810
],
911
"autoClosingPairs": [
10-
["<", ">"],
11-
["'", "'"],
12-
["\"", "\""]
12+
{ "open": "{", "close": "}"},
13+
{ "open": "[", "close": "]"},
14+
{ "open": "(", "close": ")" },
15+
{ "open": "'", "close": "'" },
16+
{ "open": "\"", "close": "\"" },
17+
{ "open": "<!--", "close": "-->", "notIn": [ "comment", "string" ]},
18+
{ "open": "<![CDATA[", "close": "]]>", "notIn": [ "comment", "string" ]}
1319
],
1420
"surroundingPairs": [
15-
["<", ">"],
16-
["'", "'"],
17-
["\"", "\""]
18-
]
19-
20-
// enhancedBrackets: [{
21-
// tokenType: 'tag.tag-$1.xml',
22-
// openTrigger: '>',
23-
// open: /<(\w[\w\d]*)([^\/>]*(?!\/)>)[^<>]*$/i,
24-
// closeComplete: '</$1>',
25-
// closeTrigger: '>',
26-
// close: /<\/(\w[\w\d]*)\s*>$/i
27-
// }],
28-
29-
// autoClosingPairs: [['\'', '\''], ['"', '"'] ]
30-
21+
{ "open": "'", "close": "'" },
22+
{ "open": "\"", "close": "\"" },
23+
{ "open": "{", "close": "}"},
24+
{ "open": "[", "close": "]"},
25+
{ "open": "(", "close": ")" },
26+
{ "open": "<", "close": ">" }
27+
],
28+
"folding": {
29+
"markers": {
30+
"start": "^\\s*<!--\\s*#region\\b.*-->",
31+
"end": "^\\s*<!--\\s*#endregion\\b.*-->"
32+
}
33+
}
3134
}

0 commit comments

Comments
 (0)