Skip to content

Commit

Permalink
[XML] Use the same HTML language configuration for XML
Browse files Browse the repository at this point in the history
This PR is a copy/paste of the HTML language configuration to have for instance autoClosingPairs for Comments and adds autoClosingPairs for CDATA.
  • Loading branch information
angelozerr authored Jul 22, 2019
1 parent 4deeb95 commit ce7f99f
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions extensions/xml/xml.language-configuration.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
{
"comments": {
"lineComment": "",
"blockComment": ["<!--", "-->"]
"blockComment": [ "<!--", "-->" ]
},
"brackets": [
["<", ">"]
["<!--", "-->"],
["<", ">"],
["{", "}"],
["(", ")"]
],
"autoClosingPairs": [
["<", ">"],
["'", "'"],
["\"", "\""]
{ "open": "{", "close": "}"},
{ "open": "[", "close": "]"},
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'" },
{ "open": "\"", "close": "\"" },
{ "open": "<!--", "close": "-->", "notIn": [ "comment", "string" ]},
{ "open": "<![CDATA[", "close": "]]>", "notIn": [ "comment", "string" ]}
],
"surroundingPairs": [
["<", ">"],
["'", "'"],
["\"", "\""]
]

// enhancedBrackets: [{
// tokenType: 'tag.tag-$1.xml',
// openTrigger: '>',
// open: /<(\w[\w\d]*)([^\/>]*(?!\/)>)[^<>]*$/i,
// closeComplete: '</$1>',
// closeTrigger: '>',
// close: /<\/(\w[\w\d]*)\s*>$/i
// }],

// autoClosingPairs: [['\'', '\''], ['"', '"'] ]

{ "open": "'", "close": "'" },
{ "open": "\"", "close": "\"" },
{ "open": "{", "close": "}"},
{ "open": "[", "close": "]"},
{ "open": "(", "close": ")" },
{ "open": "<", "close": ">" }
],
"folding": {
"markers": {
"start": "^\\s*<!--\\s*#region\\b.*-->",
"end": "^\\s*<!--\\s*#endregion\\b.*-->"
}
}
}

0 comments on commit ce7f99f

Please sign in to comment.