Fix #29664, Fix #29668. Add JSON indentation rules.

This commit is contained in:
rebornix
2017-06-28 15:43:18 -07:00
parent 886f472c31
commit 15ccb8d53a

View File

@@ -102,7 +102,11 @@ export function activate(context: ExtensionContext) {
context.subscriptions.push(disposable);
languages.setLanguageConfiguration('json', {
wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|[^\s{}\[\],:]+/
wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|[^\s{}\[\],:]+/,
indentationRules: {
increaseIndentPattern: /^.*(\{[^}]*|\[[^\]]*)$/,
decreaseIndentPattern: /^\s*[}\]],?\s*$/
}
});
}