microsoft / microsoft/vscode-cpptools
Disable/Modify class/struct attribute indentation in VCFormat
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating VCFormat's handling of access-modifier indentation and attributes or struct members. Implement the requested option so member indentation can be relative to the class or struct braces rather than the access modifier, then verify that both enabled and disabled indentation styles produce the expected formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100