Skip to content
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

Formatting on type (break before curly braces) is not working for C/C++/C# languages (possibly some others too) #94198

Closed
interpol-kun opened this issue Apr 1, 2020 · 4 comments
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@interpol-kun
Copy link

interpol-kun commented Apr 1, 2020

Issue Type: Bug

  1. Open fresh VSC, in the settings check format on Type, on Paste and on Save.
  2. Install official C/C++ or C# extension.
  3. For C/C++, change the formatting to follow Visual Studio style (Clang_format_style).
  4. Write any function with curly braces, for example.
  5. The formatting won't apply. Hit CTRL+S and it will apply now. Here's the example of formatting not applying on type, but applying on CRTL+S.

Expected behaviour:
VSCode should format the code on type like it does with JavaScript (here's the example) right outside the box.

VS Code version: Code - OSS 1.43.2 (0ba0ca5, 2020-03-25T01:43:18.461Z)
OS version: Linux x64 5.5.13-1-MANJARO

System Info
Item Value
CPUs Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz (4 x 3998)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off_ok
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 23.37GB (0.72GB free)
Process Argv --no-sandbox --unity-launch --no-sandbox
Screen Reader no
VM 0%
@vscodebot
Copy link

vscodebot bot commented Apr 1, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@interpol-kun
Copy link
Author

Also I have to add that that issue haunting me from the first day I started using VSCode. Is not an exclusive for me, it happens to a lot of people using the different languages. I have an opened issue for omnisharp since summer, and the devs seems to ignore it.

It is really a shame that the text editor can't do the basic formatting right without forcing you to try million of options and eventually open an issue.

@jrieken
Copy link
Member

jrieken commented Apr 2, 2020

/extC++

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants
@jrieken @interpol-kun and others