https://stackoverflow.com/a/45671704/10130690
Open the Command Palette (CtrlShiftP | macOS: ⇧⌘P)
Preferences: Configure language specific settings… (command id: workbench.action.configureLanguageBasedSettings)
Select programming language (for example TypeScript)
Add this code:
"[typescript]": {
"editor.tabSize": 2
}