diff --git a/extensions/json/client/src/jsonMain.ts b/extensions/json/client/src/jsonMain.ts index 962b6d893481ba61d052debb174b5f696807108f..6180cdfc5c991b21fdc4e2fa2824707ab294de94 100644 --- a/extensions/json/client/src/jsonMain.ts +++ b/extensions/json/client/src/jsonMain.ts @@ -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*$/ + } }); }