Skip to content

onEnterRules not considered when determining new line indentation #136592

@ssigwart

Description

@ssigwart

Hitting enter adds extra whitespace when onEnterRule reduces indent on previous blank line. For example, with typescript and PHP, this happens after single line if statements and after JSDoc/PHPDoc.

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

  • VS Code Version: 1.62.0
  • OS Version: macOS Big Sur

Steps to Reproduce A:

  1. Use the following type script rule.
  2. Place mouse on line 3.
  3. Hit Enter. Line 4 will start with a tab.

If you hit enter on

if (1)
	console.log('test');

Steps to Reproduce B:

  1. Use the following type script rule.
  2. Place mouse on line 4.
  3. Hit Enter. Line 5 will start with a single space.
/**
 * JSDoc
 */

Metadata

Metadata

Assignees

Labels

editor-autoindentEditor auto indentation issuesfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions