Since 2023 there is a new setting terminal.integratededitor.tabStopWidthindentSize to set the tab stopindentation size separately from the indentationtab stop size.
This is particularly useful for editing legacy code which relies on 8-space tabs but uses fewer spaces for indentation.
Here's an example configuration for a 4-space indentation, while aligning actual TABs on 8 spaces:
"editor.insertSpaces": true, "editor.tabSize"indentSize": 4, "terminal.integrated"editor.tabStopWidth"tabSize": 8, 