Skip to content

Clang Formatter ignore special comment indentationΒ #98165

@drkhodakarami

Description

@drkhodakarami

Hi
I'm using clang formatter for vs code, There are two possible scenarios that can be added to formatter and they will help lots of people.

1- Lets say that I have something like this //--- anything after......
In this case, any comment that starts with ---, I prefer to be untouched and ignored for indentation and alignment by formatter.

2- Comments starting at column number 0 : Again, any comment that starts at column number 0 should be ignored by formatter.

these two can become available by some option in the .clong-format file like this :
CommentIgnor: "---"
CommentIgnoreColumnZero: true

Please add these two options. I believe that many people have asked for one or both of these in different places on web.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions