Skip to content

Add onType rules similar to onEnter rules #251101

Open
@aiday-mar

Description

@aiday-mar

It may be useful to have onType rules similar to onEnter rules which look at the previous line text, the before range text and the after range text to determine whether to outdent the text when text is typed. The use case for this would be to outdent the { brackets when typed in the following case:

if (true)
    {}

This currently is fixed by outdenting the current line when the current line matches the increaseIndentationPattern and the previous line matches the indentNextLinePattern. This is however leading to some regressions like this : #224584

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions