This commit is contained in:
Peng Lyu
2019-08-02 17:51:54 -07:00
parent cf41b420d8
commit c4c427198d
3 changed files with 71 additions and 2 deletions

View File

@@ -223,7 +223,7 @@ export function activate(context: ExtensionContext) {
let languageConfiguration: LanguageConfiguration = {
wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|[^\s{}\[\],:]+/,
indentationRules: {
increaseIndentPattern: /^.*(\{[^}]*|\[[^\]]*)$/,
increaseIndentPattern: /({+(?=([^"]*"[^"]*")*[^"}]*$))|(\[+(?=([^"]*"[^"]*")*[^"\]]*$))/,
decreaseIndentPattern: /^\s*[}\]],?\s*$/
}
};