Skip to content

'reindent all lines' and formatter have different formatting strategies #19140

Closed
@aeschli

Description

@aeschli

Testing #19091
In a typescript file:

class B {
	public foo() {
		console.log('hello');
		switch (parseInt(this.toString())) {
			case 1: 
				break;
			case 2:
				break;
		}
	}
}
  • use 'Reindent All Lines'
  • Indenting of the 'break' statements is changed to align to the case statements
  • Use the formatter: break statements are indented again

It would be better if formatter and the reindent command use the same indentation strategy.

Metadata

Metadata

Assignees

Labels

*out-of-scopePosted issue is not in scope of VS Codeeditor-autoindentEditor auto indentation issuestypescriptTypescript support issuesunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions