-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format On Type doesn't work #3128
Comments
I'm seeing this behavior with VSCode 1.40 and C# Extension 1.21.6 |
I'm getting this behavior also. No formatting extension is formatting unless I do a save. |
Also getting this. Any update when this fix will be released? |
I'm also getting this behavior with the latest version of vscode and the c# extension |
I am also facing this issue with vscode |
duplicate of #1591 |
Issue Description
Editor option "Format on Type" does not work. Typing is ignored and formatting could be applied only via Save or Paste (if they are toggled on).
Steps to Reproduce
Install fresh VSC, toggle on "Format On Type" option in settings, install C# extension from the marketplace. Open up the C# solution, start writing any method with curly braces. After you hit enter it wont format the braces. Hit Ctrl+S and formatting will be applied.
Here is the GIF of that behaviour. (I opened curly braces, pressed ENTER and then pressed CTRL+S -- this is the moment the formatting was applied).
More to say, I have reproduced the same error on both Ubuntu 19.04 and Windows 10, on both Insider and Stable VSC builds.
I did a fresh installation of VSC and the C# extension (I removed any settings and config files associated with VSC and extensions). It didn't help.
Expected Behavior
Code formatting should be applied on typing.
Actual Behavior
Code formatting only applied on Save or Paste
Environment information
VSCode version: 1.35.1
C# Extension: 1.20.0
Dotnet Information
????? SDK ??? .NET Core (?????????? ????? global.json): Version: 2.1.503 Commit: 4c506e0f35????? ??????????:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.503\
Host (useful for support):
Version: 2.1.7
Commit: cca5d72d48
.NET Core SDKs installed:
2.1.3 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.104 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.302 [C:\Program Files\dotnet\sdk]
2.1.503 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: