Migrate JSON to language-configuration

This commit is contained in:
Martin Aeschlimann 2016-07-21 19:54:03 +02:00
parent c04f01e60c
commit e7ae751e50
4 changed files with 20 additions and 22 deletions

View file

@ -89,17 +89,7 @@ export function activate(context: ExtensionContext) {
context.subscriptions.push(disposable);
languages.setLanguageConfiguration('json', {
wordPattern: /(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,
__characterPairSupport: {
autoClosingPairs: [
{ open: '{', close: '}' },
{ open: '[', close: ']' },
{ open: '(', close: ')' },
{ open: '"', close: '"', notIn: ['string'] },
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
{ open: '`', close: '`', notIn: ['string', 'comment'] }
]
}
wordPattern: /(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g
});
});
}

View file

@ -1,10 +0,0 @@
{
"comments": {
"lineComment": "//",
"blockComment": [ "/*", "*/" ]
},
"brackets": [
["{", "}"],
["[", "]"]
]
}

View file

@ -0,0 +1,18 @@
{
"comments": {
"lineComment": "//",
"blockComment": [ "/*", "*/" ]
},
"brackets": [
["{", "}"],
["[", "]"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}", "notIn": ["string"] },
{ "open": "[", "close": "]", "notIn": ["string"] },
{ "open": "(", "close": ")", "notIn": ["string"] },
{ "open": "'", "close": "'", "notIn": ["string"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "`", "close": "`", "notIn": ["string", "comment"] }
]
}

View file

@ -35,7 +35,7 @@
"application/json",
"application/manifest+json"
],
"configuration": "./json.configuration.json"
"configuration": "./language-configuration.json"
}
],
"grammars": [