Skip to content

Feature request: Two different indentation width options, one for code, one for pre-processor directives #42264

@hartwork

Description

@hartwork
Bugzilla Link 42919
Version unspecified
OS All
CC @claudiusaiz

Extended Description

It seems like option "IndentWidth" effects both C/C++ code indentation width as well as pre-processor indentation width. What I have seen a few times is that pre-processor indentation uses a single space per level while the C/C++ code in the same file uses 2 or 4 spaces. "IndentWidth" seems to affect both widths which also means that pre-processor code will look very noise when "IndentWidth" is more than 2.

So it would be great to have two options, "IndentWidth" and a new one "IndentWidthPP"(?), thinking of existing "IndentPPDirectives".

Would that be possible?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang-formatenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions