KEMBAR78
Wrong auto-indentation in typescript · Issue #209802 · microsoft/vscode · GitHub
Skip to content

Wrong auto-indentation in typescript #209802

@rzvc

Description

@rzvc

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.88.0
  • OS Version: Ubuntu 22.04

Steps to Reproduce:

if (true)<enter>
	{<enter>
	}

This seems to happen on for and while as well. In other languages auto-indentation doesn't happen after the first <enter> in the example. While it could be good as a feature, it would be great if on typing the opening bracket, it would automatically un-indent. Also, it seems like the kind of thing that needs a toggle, because it can backfire in multiple ways.

Another thing that I noticed was that the auto-indentation happens even if the if line is commented out.

// if (true)<enter>
	|<cursor ends up here>

This was not a problem in the previous version.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-autoindentEditor auto indentation issuesinsiders-releasedPatch has been released in VS Code InsidersjavascriptJavaScript support issuestypescriptTypescript support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions