Tech Blog

VSCode の設定を見直す

先日参加した VSCodeConJP見た目からはじめる生産性向上 が良かったので、内容に沿って必要最低限 VSCode に導入する

今回の環境

TL;DR

Before

Before

Workspace
  // blog.code-workspace
+ {
+   "folders": [
+     {
+       "path": "_posts"
+     },
+     {
+       "path": "src"
+     }
+   ]
+ }
Files: Exclude
  // blog.code-workspace
  {
  ...
+       "path": "src"
+     }
-   ]
+   ],
+   "settings": {
+     "files.exclude": {
+       "**/.devcontainer": true,
+       "**/.github": true,
+       "**/.husky": true,
+       "**/.next": true,
+       "**/.vscode": true,
+       "**/node_modules": true,
+       "**/out": true
+     }
+   }
  }

Files exclude

Explorer > File Nesting
  // blog.code-workspace
  ...
          "path": "src"
      }
    ],
    "settings": {
+     "explorer.fileNesting.enabled": true,
+     "explorer.fileNesting.expand": false,
+     "explorer.fileNesting.patterns": {
+       "*.md": "$(capture).*",
+       "*.ts": "$(capture).d.ts.map, $(capture).*.ts, $(capture)_*.ts",
+       "*.tsx": "$(capture).ts, $(capture).*.tsx, $(capture)_*.ts, $(capture)_*.tsx, $(capture).css",
+       ".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
+       "next.config.*": "jest.config.*, next-env.d.ts, postcss.config.*, tailwind.config.*, tsconfig.*",
+       "package.json": ".commitlint*, .editorconfig, .eslint*, .node-version, .prettier*, .stylelint*, .textlint*, package-lock.json",
+       "README*": "AUTHORS, CHANGELOG*, CODE_OF_CONDUCT*, CONTRIBUTING*, COPYING*, CREDITS, LICENSE*",
+     },
      "files.exclude": {
        "**/.devcontainer": true,
        "**/.github": true,
  ...

Explorer file nesting

After

After

参考にしたページ