Skip to content

Autoindent doesn't trigger on closing parenthesis #201424

@russelldavis

Description

@russelldavis

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

  • VS Code Version: 1.85.1
  • OS Version: Darwin arm64 22.6.0

Steps to Reproduce:

  1. Ensure the Editor: Auto Indent setting is set to "full"
  2. Add the following to a .js file:
console.log(
    "bar");
  1. Place the caret after between the closing quote and the closing parenthesis.
  2. Press enter

Expected: Autoindent should decrease the indentation of the new line, resulting in this:

console.log(
    "bar"
);

Actual: Autoindent doesn't do anything, resulting in this:

console.log(
    "bar"
    );

I tracked this down to a missing closing paren in the decreaseIndentPattern in the javascript and typescript language configurations. You can see there's an opening paren in increaseIndentPattern but no closing paren in decreaseIndentPattern.

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 InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions