Anthony's
This is a config snippet making your file tree cleaner by the file nesting feature of VS Code.
Inspired by this tweet by Dzhavat Ushev and this tweet by Jacob Hands.
With some scripts to avoid duplication of works. And it's very opinionated.
Open your VS Code, bring up your settings.json
, copy-n-paste the snippet below, and you are good to go :)
// updated 2022-03-08 04:30
// https://github.com/antfu/vscode-file-nesting-config
"explorer.experimental.fileNesting.enabled": true,
"explorer.experimental.fileNesting.expand": false,
"explorer.experimental.fileNesting.patterns": {
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
"*.js": "$(capture).js.map, $(capture).min.js, $(capture).d.ts",
"*.jsx": "$(capture).js",
"*.ts": "$(capture).js, $(capture).*.ts",
"*.tsx": "$(capture).ts",
"index.d.ts": "*.d.ts",
"shims.d.ts": "*.d.ts",
"go.mod": "go.sum",
".env": "*.env, .env*, env.d.ts",
"dockerfile": "dockerfile*, .dockerignore",
"package.json": ".browserslist*, .circleci*, .commitlintrc*, .editorconfig, .eslint*, .flowconfig, .gitlab*, .gitpod*, .huskyrc*, .markdownlint*, .node-version, .nodemon*, .npm*, .nvmrc, .pnpm*, .prettier*, .releaserc*, .sentry*, .stackblitz*, .stylelint*, .tazerc*, .textlintrc*, .travis*, .vscode*, .watchman*, .yamllint*, .yarnrc*, api-extractor.json, appveyor*, azure-pipelines*, build.config.*, commitlint*, crowdin*, dangerfile.*, gulp*, jenkins*, jsconfig.*, lerna*, lint-staged*, netlify*, nx.*, package-lock.json, pnpm*, pullapprove*, renovate*, rollup.config.*, stylelint*, tsconfig.*, tsdoc.*, tslint.*, tsup.config.*, turbo*, vercel*, vetur.config.*, webpack.config.*, yarn*",
"readme.md": "authors, backers.md, changelog*.md, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md",
"cargo.toml": "cargo.lock, rust-toolchain.toml, rustfmt.toml",
"gemfile": "gemfile.lock, .ruby-version",
"vite.config.*": "index.html, *.env, .babelrc, .codecov, .env*, .mocha*, api-extractor.json, ava.config.*, babel.config.*, cypress.json, env.d.ts, jasmine.*, jest.config.*, jsconfig.*, karma*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
"vue.config.*": "*.env, .babelrc, .codecov, .env*, .mocha*, api-extractor.json, ava.config.*, babel.config.*, cypress.json, env.d.ts, jasmine.*, jest.config.*, jsconfig.*, karma*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
"nuxt.config.*": "*.env, .babelrc, .codecov, .env*, .mocha*, api-extractor.json, ava.config.*, babel.config.*, cypress.json, env.d.ts, jasmine.*, jest.config.*, jsconfig.*, karma*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
"next.config.*": "*.env, .babelrc, .codecov, .env*, .mocha*, api-extractor.json, ava.config.*, babel.config.*, cypress.json, env.d.ts, jasmine.*, jest.config.*, jsconfig.*, karma*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
"svelte.config.*": "*.env, .babelrc, .codecov, .env*, .mocha*, api-extractor.json, ava.config.*, babel.config.*, cypress.json, env.d.ts, jasmine.*, jest.config.*, jsconfig.*, karma*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
"remix.config.*": "remix.*, *.env, .babelrc, .codecov, .env*, .mocha*, api-extractor.json, ava.config.*, babel.config.*, cypress.json, env.d.ts, jasmine.*, jest.config.*, jsconfig.*, karma*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*"
}
The snippet is generated by script, do not edit the README directly.
Instead, go to update.mjs
, make changes and then submit a PR. Thanks!
MIT