<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/141129>141129</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang-format not following rule `UseTab: Always`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kunalchandan
</td>
</tr>
</table>
<pre>
# Issue
First I would like to thank the authors of the tool. I have enjoyed using it and hope to continue using it.
If there is something I am doing incorrectly I would gladly be corrected.
I believe Clang-format is indenting with spaces when I want to only use tab indents.
## Sample
```c
#define FG_CYN "\x1B[36m"
#define FG_WHT "\x1B[37m"
#define RST "\x1B[0m"
void fun_function(int param_a) {
printf("I have a really long string here that exceeds my column limit");
printf("I sometimes like" FG_CYN " to break with inserted defines" RST);
}
```
My minimal `.clang-format`
```yaml
BasedOnStyle: GNU
Language: Cpp
ColumnLimit: 80
UseTab: Always
IndentWidth: 8
TabWidth: 8
ContinuationIndentWidth: 8
BreakStringLiterals: true
```
## Output
```c
#define FG_CYN "\x1B[36m"
#define FG_WHT "\x1B[37m"
#define RST "\x1B[0m"
void fun_function(int param_a)
{
printf("I have a really long string I's extra super long here that "
"exceeds my column limit");
printf("I sometimes like colors and I insert them like this " FG_CYN
" to break with inserted defines" RST);
}
```
more clearly or in another way
```c
void fun_function(int param_a)
{
\tprintf("I have a really long string I's extra super long here that "
\t\s\s\s\s\s\s\s\s"exceeds my column limit");
\tprintf("I sometimes like colors and I insert them like this " FG_CYN
\t\s\s\s\s\s\s\s\s" to break with inserted defines" RST);
}
```
I don't want to see `\s` or space characters used to indent, and only ever want to see `\t` or tabs as indents.
Thanks in advance :)
## Other supporting system information
Using vscode.
```
$ clang-format --version
clang-format version 20.1.4
```
clang-format installed with python venv
Ubuntu 22.04
Python 3.10
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzUVkFv2zgT_TX0ZRBBpiw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