Closed simon-assistiq closed 11 months ago
It's listed under the options for the rule, see the --indent
option. If you want 2 spaces use --indent 2
This is what I'm seeing
Where does it say what the default is? Or am I looking in the wrong file?
The default is 4 spaces.
You can use the --inferoptions command to generate a set of defaults from your project, but that's slow, so it doesn't run every time automatically.
Thanks
Possibly stupid question but I'm just curious. The Rules.md file doesn't specify a default indent. Is there one? When you run
swiftformat .
without specifyingindent
it does seem to leave the indents in my project unchanged (4 spaces)… is it actually defaulting to 4 or is it figuring out the indent dynamically? Tried a quick search in the code but it wasn't clear to me.