Well, the new version of Visual Studio Code allows you to specify differently file type for the tabSize. Here is the example of my settings.json with default four spaces and JavaScript/JSON two spaces:
{ // I want my default to be 4, but JS/JSON to be 2 "editor.tabSize": 4, "[javascript]": { "editor.tabSize": 2 }, "[json]": { "editor.tabSize": 2 } } PS: Well, if you do not know how to open this file, you can: click left-bottom gear -> then settings