I want to introduce clang-formatter to our company, but there are some restrictions, like:
Some files in our company that are better read with a tab-width=2 while others are better read with tab-width=4.
This means that some files (due to the nature of their content) should have a different .clang-format configuration file. So, assumming that we end up with 2 or 3 configurations, suitable for each content, is there a way that I can force some files to be formatted by a particular .clang_format ?
for example,
- could this be done by placing a different .clang_format in each folder ?
or
- by entering the YAML lines as comments at the beginning of each file (like doxygen) ?
we use C, C++, visual studio and vim