diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 248d81cb07..e56e2805c3 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -204,7 +204,7 @@ namespace ts.formatting { // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line let useActualIndentation = - (isDeclaration(current) || isStatement(current)) && + (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent.kind === SyntaxKind.SourceFile || !parentAndChildShareLine); if (!useActualIndentation) {