microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

Disable/Modify class/struct attribute indentation in VCFormat #8402

Open david-scepanovic-nutanix opened 2 years ago

david-scepanovic-nutanix commented 2 years ago

Type: Feature Request

As the title says, there's the ability to disable access modifier indentation, but no such capability for attributes following the access modifier. The consequence is that styles like Google's where the indentation of access modifiers is 1 and the indentation of attributes following them is 2, is not possible to emulate using the VCFormat. Please add this feature as this is a basic one to have for a formatter. You could go fancy with it in the end, but for the start just make it possible to ignore the indentation of the struct members relative to the access modifiers and so make it relative to the struct/class braces instead.

Colengms commented 2 years ago

Hi @david-scepanovic-nutanix . The implementation of vcFormat is shared with VS. Would you like to open a feature request against VS directly? If so, you can do that here: https://developercommunity.visualstudio.com/report?space=62&entry=suggestion That would allow you to own the request and track its progress. Or, if you'd prefer, I can open a feature request internally.

david-scepanovic-nutanix commented 2 years ago

Hi @Colengms. Thanks for the fast reply again. If it's fine with you, you go ahead and open a feature request internally, as it might get taken more seriously. Thanks once again.

Colengms commented 2 years ago

Thanks @david-scepanovic-nutanix . I've opened a feature request internally.