You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I have observed (and understand the documentation), using clang-format inside an IDE (e.g., Visual Studio) means that for each file, the closest .clang-format file is used, so one may end up getting different formatting styles for source code files in different directories. This is a great feature!
Now, is there any way of having different styles for files in the same directory? I haven't found one, which is why I am opening this feature request. (And I hope I am wrong, so that someone can close this issue and tell me where to find this in the documentation.) What I would like, for example, is one of the following:
Being able to point clang-format to the name of a style file from within the source-code file
(// clang-format Style: bers.clang_format or similar)
Being able to change individual style options from within each source-code file
(// clang-format BinPackParameters: false or similar)
Being able to put a mapping file into a directory that says something like
file1.cpp: bers.clang-format
Anything that achieves a similar effect.
The aim of this exercise, and the benefit of such as feature, is for multiple developers working on files in the same folder to use slightly varying style options for their own files while still being able to correctly format other files in the same directory. This is already possible across directories, and it would be a great addition inside a directory.
The text was updated successfully, but these errors were encountered:
As far as I have observed (and understand the documentation), using
clang-format
inside an IDE (e.g., Visual Studio) means that for each file, the closest.clang-format
file is used, so one may end up getting different formatting styles for source code files in different directories. This is a great feature!Now, is there any way of having different styles for files in the same directory? I haven't found one, which is why I am opening this feature request. (And I hope I am wrong, so that someone can close this issue and tell me where to find this in the documentation.) What I would like, for example, is one of the following:
clang-format
to the name of a style file from within the source-code file(
// clang-format Style: bers.clang_format
or similar)(
// clang-format BinPackParameters: false
or similar)The aim of this exercise, and the benefit of such as feature, is for multiple developers working on files in the same folder to use slightly varying style options for their own files while still being able to correctly format other files in the same directory. This is already possible across directories, and it would be a great addition inside a directory.
The text was updated successfully, but these errors were encountered: