dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.85k stars 667 forks source link

Editing does not auto indent code #4957

Open jtsom opened 2 years ago

jtsom commented 2 years ago

Issue Description

When entering C# code, if the line is against the left margin, hitting the ";" at the end of the line does not auto-indent the line. It used to prior to some update of the C# extension.

If the code line is even one space away from the left margin, hitting ";" WILL indent the line properly.

Steps to Reproduce

Type in some code, make sure it started at the left margin. Type a ";" to end the line.

Expected Behavior

Code automatically formats and indents to line up with rest of the code.

Actual Behavior

DOES NOT indent - code stays at left margin. UNLESS code is at least ONE column over - then code will indent.

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.64.0-insider C# Extension: 1.23.17

Dotnet Information .NET SDK (reflecting any global.json): Version: 6.0.100 Commit: 9e8b04bbff Runtime Environment: OS Name: Windows OS Version: 10.0.19044 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.100\ Host (useful for support): Version: 6.0.0 Commit: 4822e3c3aa .NET SDKs installed: 5.0.403 [C:\Program Files\dotnet\sdk] 6.0.100 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |azure-account|ms-vscode|0.9.11| |csharp|ms-dotnettools|1.23.17| |git-graph|mhutchie|1.30.0| |hexeditor|ms-vscode|1.8.2| |hl7tools|RobHolme|1.13.2| |material-icon-theme|PKief|4.11.0| |msbuild-project-tools|tintoy|0.4.3| |night-owl|sdras|2.0.1| |quicktype|quicktype|12.0.46| |sync-scroll|dqisme|1.3.0| |TabOut|albert|0.2.1| |vscode-azurefunctions|ms-azuretools|1.6.0| |vscode-azureresourcegroups|ms-azuretools|0.4.0| |vscode-azurestorage|ms-azuretools|0.12.1| |vscode-base64|adamhartford|0.1.0| |vscode-thunder-client|rangav|1.9.1| |vscodeintellicode|VisualStudioExptTeam|1.2.15|;
jtsom commented 2 years ago

4 months later and no response to this, which IS still happening...