dotnet / dotnet/vscode-csharp

Automatically indent (and de-indent on braces) in single line `if`/`for`/`while`

Open
#6,597 1 comment 0 reactions 0 assignees View on GitHub
Feature Request Triaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

Copied from https://github.com/microsoft/vscode-dotnettools/issues/618

### Describe the Issue

After write an `if`/`for`/`while` and hitting enter (presumably to write an one line statement with no brackets), the caret should go to next line with a nested indentation level, not the same as `if`/`for`/`while`

VS/ VSMac:

https://github.com/microsoft/vscode-dotnettools/assets/926868/01d0eb1c-b5ae-4020-ad8f-7f701e6a44e6

VSCode:

https://github.com/microsoft/vscode-dotnettools/assets/926868/6fcbbf2c-7d8a-44e5-939b-35a969ba028b

I really think .NET on VSCode have potential. But this kind of paper-cut make really annoy to use it.

### Steps To Reproduce

Hit `Enter` after an if/while/for statement

### Expected Behavior

It should just behave like VS or VSMac editor

### Environment Information

VSCode: Version: 1.83.1 (Universal)
Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc
Date: 2023-10-10T23:46:55.789Z (4 days ago)
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 22.6.0

C# v2.6.24
C# Dev Kit v0.5.150

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.