| name | vscode-workspace-setup |
| description | Configures VS Code workspaces with optimal settings, extensions, tasks, and debugging for team consistency. Use when users request "VS Code setup", "workspace settings", "team VS Code config", "editor configuration", or "devcontainer setup". |
VS Code Workspace Setup
Configure VS Code for optimal team productivity and consistency.
Core Workflow
- Create workspace settings: .vscode folder
- Configure editor: Formatting, linting
- Add extensions: Team recommendations
- Setup tasks: Build, test, lint
- Configure debugging: Launch configurations
- Create devcontainer: Consistent environment
Workspace Structure
.vscode/
├── settings.json # Workspace settings
├── extensions.json # Recommended extensions
├── tasks.json # Build tasks
├── launch.json # Debug configurations
└── snippets/ # Custom snippets
└── typescript.json
Workspace Settings
{
"editor.formatOnSave": true,
"editor.formatOnPaste": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.rulers": [100],
"editor.wordWrap": "off",
"editor.minimap.enabled": false,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.inlineSuggest.enabled": true,
"editor.quickSuggestions": {
"strings": true
},
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.exclude": {
"**/node_modules": true,
"**/.git": true,
"**/.DS_Store": true,
"**/dist": true,
"**/.next": true,
"**/coverage": true
},
"files.watcherExclude": {
"**/node_modules/**": true,
"**/.git/objects/**": true,
"**/dist/**": true,
"**/.next/**": true
},
"files.associations": {
"*.css": "tailwindcss"
},
"search.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/.next": true,
"**/coverage": true,
"pnpm-lock.yaml": true,
"package-lock.json": true
},
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.quoteStyle": "single",
"typescript.suggest.autoImports": true,
"typescript.updateImportsOnFileMove.enabled": "always",
"typescript.inlayHints.parameterNames.enabled": "literals",
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
"typescript.tsdk": "node_modules/typescript/lib",
"javascript.preferences.importModuleSpecifier": "relative",
"javascript.preferences.quoteStyle": "single",
"javascript.updateImportsOnFileMove.enabled": "always",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"eslint.workingDirectories": [{ "mode": "auto" }],
"eslint.codeActionsOnSave.mode": "problems",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.wordWrap": "on"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"tailwindCSS.experimental.classRegex": [
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
"tailwindCSS.includeLanguages": {
"typescript": "javascript",
"typescriptreact": "javascript"
},
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.inputValidation": true,
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.fontSize": 13,
"terminal.integrated.scrollback": 10000,
"explorer.compactFolders": false,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, .npmrc",
"tsconfig.json": "tsconfig.*.json",
".eslintrc*": ".eslintignore, .prettierrc*, .prettierignore",
"*.ts": "${capture}.test.ts, ${capture}.spec.ts",
"*.tsx": "${capture}.test.tsx, ${capture}.spec.tsx"
},
"debug.javascript.autoAttachFilter": "smart",
"testing.automaticallyOpenPeekView": "never"
}
Recommended Extensions
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"ms-vscode.vscode-typescript-next",
"yoavbls.pretty-ts-errors",
"dsznajder.es7-react-js-snippets",
"burkeholland.simple-react-snippets",
"eamodio.gitlens",
"mhutchie.git-graph",
"vitest.explorer",
"orta.vscode-jest",
"streetsidesoftware.code-spell-checker",
"christian-kohler.path-intellisense",
"christian-kohler.npm-intellisense",
"mikestead.dotenv",
"EditorConfig.EditorConfig",
"github.copilot",
"github.copilot-chat",
"ms-vscode.js-debug-nightly"
Build Tasks
{
"version": "2.0.0",
"tasks": [
{
"label": "dev",
"type": "npm",
"script": "dev",
"problemMatcher": [],
"isBackground": true,
"presentation": {
"reveal": "always",
"panel": "dedicated"
},
"group": {
"kind": "build",
"isDefault": true
}
},
Debug Configurations
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: Debug Server",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
},
{
"name": "Next.js: Debug Full Stack",
"type": "node-terminal",
"request": "launch",
Custom Snippets
{
"React Functional Component": {
"prefix": "rfc",
"body": [
"interface ${1:Component}Props {",
" $2",
"}",
"",
"export function ${1:Component}({ $3 }: ${1:Component}Props) {",
" return (",
" <div>",
" $0",
" </div>",
" );",
"}"
],
"description": "React Functional Component with TypeScript"
},
"React useState": {
"prefix": "us",
"body": [
"const [${1:state}, set${1/(.*)/${1:/capitalize}/}] = useState<${2:type}>($3);"
],
Dev Container
{
"name": "Node.js Development",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"forwardPorts": [3000, 5173],
"containerEnv": {
"NODE_ENV": "development"
},
"postCreateCommand": "npm install",
"customizations": {
"vscode"
EditorConfig
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[Makefile]
indent_style = tab
Best Practices
- Commit settings: Version control .vscode
- Use workspace settings: Not user settings
- Recommend extensions: extensions.json
- Configure tasks: Common operations
- Setup debugging: Launch configurations
- Add snippets: Team conventions
- Use devcontainers: Consistent environments
- File nesting: Clean explorer
Output Checklist
Every VS Code workspace should include: