1. 打开命令栏 (Windows 快捷键:Ctrl + Shift+ P | macOS 快捷键: ⇧ + ⌘ +P)

  2. 选择:"Preferences: Configure language specific settings..." (command id: workbench.action.configureLanguageBasedSettings)

  3. 选择语言:JavaScript

  4. 添加代码:


"[javascript]": {
    "editor.tabSize": 2
}