VSCode format on save adding additional tabs in Solidity files
Solution 1:
The vscode-solidity extension uses Prettier for formatting(link)
To achieve formatting with 2 spaces:
- Create a file .prettierrc
- The contents should be
{
"overrides":[
{
"files":"*.sol",
"options":{
"tabWidth":2
}
}
]
}
- Restart VS code