My company currently uses VS Code for programming in C, and most people in the company use the embedded VS Code auto formatter. Currently this is set using the C_Cpp.clang_format_fallbackStyle setting within the settings.json file.
At the moment, the maximum number of columns is set to 100 characters due to legacy reasons. Within header files, where we have macros with long names, we quickly get overlapping macros that are difficult to read, e.g.
Due to legacy reasons, we don't want to change the autoformatter for all files, as it would change all our existing C files, and would make tracking real changes in svn difficult.
The compromise solution would be to change the settings for header files, where macros are typically defined, and not for c files, where the bulk of the code is.
I had a look and it doesn't look like vs code actively supports it. I saw some references to plugins, such as Prettier, but ideally I don't want to rely on everyone installing the plugin, and there is a risk of it changing based on the existing solution.
I also saw that clang auto formatter can differentiate between c and cpp files, but thats not applicable to my situation
Is it possible to set up the clang formatter to do this? If not, does anyone have any recommendations for plugins or alternative solutions?
