Endilll wrote: > > > > 3. File has been formatted with clang-format, except for the grammar, > > > > because clang-format butchers it. > > > > > > > > > Yeah, this problem comes up rather frequently, I wonder if clang-format > > > can get some additional smarts to make that less of a challenge? CC > > > @mydeveloperday @owenca > > > > > > Maybe the `CommentPragmas` option can be of help here? > > I think it might be nice to maybe add > `EnableFormatComments`/`DisableFormatComments` as options to clang-format > where users can list custom comment strings that enable/disable formatting. > We could make use of that to disable formatting between > `\verbatim`/`\endverbatim`, and it might also be useful for people coming > from other formatters (e.g. CLion’s formatter uses `@formatter:off` and > `@formatter:on` and also lets you define custom markers). > > I could work on adding options for that if there is in any interest in > this—though before I do, any other suggestions as to what the name of those > options should be? Because renaming an option after it’s been added is a bit > tedious iirc ;Þ
I think I prefer clang-format to understand what `\verbatim` is if one big `EnableFormatComments: true` is specified in the config, without manually listing it. https://github.com/llvm/llvm-project/pull/138511 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits