Skip to content

[clang-format] preprocessor directives indentation compatible with Visual Studio Code #142232

@EugeneZelenko

Description

@EugeneZelenko

It'll be great to have option to count # as space for IndentPPDirectives: AfterHash mode so formatting will be compatible with Visual Studio Code.

Desired code example:

#ifdef __GNUC__
#   pragma GCC diagnostic push
#   pragma GCC diagnostic ignored "-Wshadow"
#   pragma GCC diagnostic ignored "-Wsuggest-override"
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions