vscode-clang-format
vscode-clang-format copied to clipboard
Number of spaces for indent [cpp]
Is it possible to have the formatter follower the indent size specified in the settings.json for a given file? Or is there a way to globally make the indent size 4 spaces instead of two?
Currently it follows the indent size in the .clang-format configuration file only. So you can put
---
IndentWidth: 4
TabWidth: 4
UseTab: Never
---
in your .clang-format file. I'm going to look into an option to automatically use the editor settings when I have some time available. I'm also willing to merge patches that address that issue.
Where is the .clang-format file located?
Figured out. Just created a .clang-format file in workspace directory.