Testing with the following
clang-format -style="{BasedOnStyle: Google, UseTab: Always}" -i /path/to/file.ino
Results in spaces instead of tabs
Internally, clang-format only works with spaces, its not until the final step it replaces spaces with tabs and then it will only replace them in groups of TabWidth. Since the Google style has IndentWidth: 2 and TabWidth: 4 it wont replace them with tabs unless there are two indents on the same line.
You'll have to sync up IndentWidth and TabWidth in addition to UseTab for it to work on every line:
UseTab: Always
IndentWidth: 4
TabWidth: 4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With