Giter VIP home page Giter VIP logo

vscode-file-nesting-config's Introduction

Anthony's

File Nesting Config for VS Code

Requires VS Code v1.67

This is a config snippet making your file tree cleaner with 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.

Use it

VS Code Extension

We now have a new VS Code extension to handle the updates automatically for you.

Check the readme for instructions.

Update Manually

Open your VS Code, bring up your settings.json, copy-n-paste the snippet below, and you are good to go :)

  // updated 2024-04-21 11:40
  // https://github.com/antfu/vscode-file-nesting-config
  "explorer.fileNesting.enabled": true,
  "explorer.fileNesting.expand": false,
  "explorer.fileNesting.patterns": {
    "*.asax": "$(capture).*.cs, $(capture).*.vb",
    "*.ascx": "$(capture).*.cs, $(capture).*.vb",
    "*.ashx": "$(capture).*.cs, $(capture).*.vb",
    "*.aspx": "$(capture).*.cs, $(capture).*.vb",
    "*.axaml": "$(capture).axaml.cs",
    "*.bloc.dart": "$(capture).event.dart, $(capture).state.dart",
    "*.c": "$(capture).h",
    "*.cc": "$(capture).hpp, $(capture).h, $(capture).hxx, $(capture).hh",
    "*.cjs": "$(capture).cjs.map, $(capture).*.cjs, $(capture)_*.cjs",
    "*.component.ts": "$(capture).component.html, $(capture).component.spec.ts, $(capture).component.css, $(capture).component.scss, $(capture).component.sass, $(capture).component.less",
    "*.cpp": "$(capture).hpp, $(capture).h, $(capture).hxx, $(capture).hh",
    "*.cs": "$(capture).*.cs",
    "*.cshtml": "$(capture).cshtml.cs",
    "*.csproj": "*.config, *proj.user, appsettings.*, bundleconfig.json",
    "*.css": "$(capture).css.map, $(capture).*.css",
    "*.cxx": "$(capture).hpp, $(capture).h, $(capture).hxx, $(capture).hh",
    "*.dart": "$(capture).freezed.dart, $(capture).g.dart",
    "*.ex": "$(capture).html.eex, $(capture).html.heex, $(capture).html.leex",
    "*.fs": "$(capture).fs.js, $(capture).fs.js.map, $(capture).fs.jsx, $(capture).fs.ts, $(capture).fs.tsx, $(capture).fs.rs, $(capture).fs.php, $(capture).fs.dart",
    "*.go": "$(capture)_test.go",
    "*.java": "$(capture).class",
    "*.js": "$(capture).js.map, $(capture).*.js, $(capture)_*.js",
    "*.jsx": "$(capture).js, $(capture).*.jsx, $(capture)_*.js, $(capture)_*.jsx, $(capture).less, $(capture).module.less",
    "*.master": "$(capture).*.cs, $(capture).*.vb",
    "*.mjs": "$(capture).mjs.map, $(capture).*.mjs, $(capture)_*.mjs",
    "*.module.ts": "$(capture).resolver.ts, $(capture).controller.ts, $(capture).service.ts",
    "*.mts": "$(capture).mts.map, $(capture).*.mts, $(capture)_*.mts",
    "*.pubxml": "$(capture).pubxml.user",
    "*.razor": "$(capture).razor.cs, $(capture).razor.css, $(capture).razor.scss",
    "*.resx": "$(capture).*.resx, $(capture).designer.cs, $(capture).designer.vb",
    "*.tex": "$(capture).acn, $(capture).acr, $(capture).alg, $(capture).aux, $(capture).bbl, $(capture).blg, $(capture).fdb_latexmk, $(capture).fls, $(capture).glg, $(capture).glo, $(capture).gls, $(capture).idx, $(capture).ind, $(capture).ist, $(capture).lof, $(capture).log, $(capture).lot, $(capture).out, $(capture).pdf, $(capture).synctex.gz, $(capture).toc, $(capture).xdv",
    "*.ts": "$(capture).js, $(capture).d.ts.map, $(capture).*.ts, $(capture)_*.js, $(capture)_*.ts",
    "*.tsx": "$(capture).ts, $(capture).*.tsx, $(capture)_*.ts, $(capture)_*.tsx, $(capture).less, $(capture).module.less, $(capture).scss, $(capture).module.scss",
    "*.vbproj": "*.config, *proj.user, appsettings.*, bundleconfig.json",
    "*.vue": "$(capture).*.ts, $(capture).*.js, $(capture).story.vue",
    "*.xaml": "$(capture).xaml.cs",
    "+layout.svelte": "+layout.ts,+layout.ts,+layout.js,+layout.server.ts,+layout.server.js,+layout.gql",
    "+page.svelte": "+page.server.ts,+page.server.js,+page.ts,+page.js,+page.gql",
    ".clang-tidy": ".clang-format, .clangd, compile_commands.json",
    ".env": "*.env, .env.*, .envrc, env.d.ts",
    ".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
    ".project": ".classpath",
    "BUILD.bazel": "*.bzl, *.bazel, *.bazelrc, bazel.rc, .bazelignore, .bazelproject, WORKSPACE",
    "CMakeLists.txt": "*.cmake, *.cmake.in, .cmake-format.yaml, CMakePresets.json, CMakeCache.txt",
    "Cargo.toml": ".clippy.toml, .rustfmt.toml, cargo.lock, clippy.toml, cross.toml, rust-toolchain.toml, rustfmt.toml",
    "Dockerfile": "*.dockerfile, .devcontainer.*, .dockerignore, compose.*, docker-compose.*, dockerfile*",
    "I*.cs": "$(capture).cs",
    "Makefile": "*.mk",
    "Pipfile": ".editorconfig, .flake8, .isort.cfg, .python-version, Pipfile, Pipfile.lock, requirements*.in, requirements*.pip, requirements*.txt, tox.ini",
    "README*": "AUTHORS, Authors, BACKERS*, Backers*, CHANGELOG*, CITATION*, CODEOWNERS, CODE_OF_CONDUCT*, CONTRIBUTING*, CONTRIBUTORS, COPYING*, CREDITS, Changelog*, Citation*, Code_Of_Conduct*, Codeowners, Contributing*, Contributors, Copying*, Credits, GOVERNANCE.MD, Governance.md, HISTORY.MD, History.md, LICENSE*, License*, MAINTAINERS, Maintainers, README*, Readme*, SECURITY.MD, SPONSORS*, Security.md, Sponsors*, authors, backers*, changelog*, citation*, code_of_conduct*, codeowners, contributing*, contributors, copying*, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors*",
    "Readme*": "AUTHORS, Authors, BACKERS*, Backers*, CHANGELOG*, CITATION*, CODEOWNERS, CODE_OF_CONDUCT*, CONTRIBUTING*, CONTRIBUTORS, COPYING*, CREDITS, Changelog*, Citation*, Code_Of_Conduct*, Codeowners, Contributing*, Contributors, Copying*, Credits, GOVERNANCE.MD, Governance.md, HISTORY.MD, History.md, LICENSE*, License*, MAINTAINERS, Maintainers, README*, Readme*, SECURITY.MD, SPONSORS*, Security.md, Sponsors*, authors, backers*, changelog*, citation*, code_of_conduct*, codeowners, contributing*, contributors, copying*, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors*",
    "artisan": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, server.php, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, webpack.mix.js, windi.config.*",
    "astro.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
    "composer.json": ".php*.cache, composer.lock, phpunit.xml*, psalm*.xml",
    "default.nix": "shell.nix",
    "deno.json*": "*.env, .env.*, .envrc, api-extractor.json, deno.lock, env.d.ts, import-map.json, import_map.json, jsconfig.*, tsconfig.*, tsdoc.*",
    "flake.nix": "flake.lock",
    "gatsby-config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, gatsby-browser.*, gatsby-node.*, gatsby-ssr.*, gatsby-transformer.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
    "gemfile": ".ruby-version, gemfile.lock",
    "go.mod": ".air*, go.sum",
    "go.work": "go.work.sum",
    "hatch.toml": ".editorconfig, .flake8, .isort.cfg, .python-version, hatch.toml, requirements*.in, requirements*.pip, requirements*.txt, tox.ini",
    "mix.exs": ".credo.exs, .dialyzer_ignore.exs, .formatter.exs, .iex.exs, .tool-versions, mix.lock",
    "next.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, next-env.d.ts, next-i18next.config.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
    "nuxt.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .nuxtignore, .nuxtrc, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
    "package.json": ".browserslist*, .circleci*, .commitlint*, .cz-config.js, .czrc, .dlint.json, .dprint.json*, .editorconfig, .eslint*, .firebase*, .flowconfig, .github*, .gitlab*, .gitmojirc.json, .gitpod*, .huskyrc*, .jslint*, .knip.*, .lintstagedrc*, .markdownlint*, .node-version, .nodemon*, .npm*, .nvmrc, .pm2*, .pnp.*, .pnpm*, .prettier*, .pylintrc, .release-please*.json, .releaserc*, .ruff.toml, .sentry*, .simple-git-hooks*, .stackblitz*, .styleci*, .stylelint*, .tazerc*, .textlint*, .tool-versions, .travis*, .versionrc*, .vscode*, .watchman*, .xo-config*, .yamllint*, .yarnrc*, Procfile, apollo.config.*, appveyor*, azure-pipelines*, biome.json, bower.json, build.config.*, bun.lockb, commitlint*, crowdin*, dangerfile*, dlint.json, dprint.json*, electron-builder.*, eslint*, firebase.json, grunt*, gulp*, jenkins*, knip.*, lerna*, lint-staged*, nest-cli.*, netlify*, nodemon*, npm-shrinkwrap.json, nx.*, package-lock.json, package.nls*.json, phpcs.xml, pm2.*, pnpm*, prettier*, pullapprove*, pyrightconfig.json, release-please*.json, release-tasks.sh, release.config.*, renovate*, rollup.config.*, rspack*, ruff.toml, simple-git-hooks*, sonar-project.properties, stylelint*, tslint*, tsup.config.*, turbo*, typedoc*, unlighthouse*, vercel*, vetur.config.*, webpack*, workspace.json, xo.config.*, yarn*",
    "pubspec.yaml": ".metadata, .packages, all_lint_rules.yaml, analysis_options.yaml, build.yaml, pubspec.lock, pubspec_overrides.yaml",
    "pyproject.toml": ".commitlint*, .dlint.json, .dprint.json*, .editorconfig, .eslint*, .flake8, .flowconfig, .isort.cfg, .jslint*, .lintstagedrc*, .markdownlint*, .pdm-python, .pdm.toml, .prettier*, .pylintrc, .python-version, .ruff.toml, .stylelint*, .textlint*, .xo-config*, .yamllint*, MANIFEST.in, Pipfile, Pipfile.lock, biome.json, commitlint*, dangerfile*, dlint.json, dprint.json*, eslint*, hatch.toml, lint-staged*, pdm.lock, phpcs.xml, poetry.lock, poetry.toml, prettier*, pyproject.toml, pyrightconfig.json, requirements*.in, requirements*.pip, requirements*.txt, ruff.toml, setup.cfg, setup.py, stylelint*, tox.ini, tslint*, xo.config.*",
    "quasar.conf.js": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, quasar.extensions.json, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
    "readme*": "AUTHORS, Authors, BACKERS*, Backers*, CHANGELOG*, CITATION*, CODEOWNERS, CODE_OF_CONDUCT*, CONTRIBUTING*, CONTRIBUTORS, COPYING*, CREDITS, Changelog*, Citation*, Code_Of_Conduct*, Codeowners, Contributing*, Contributors, Copying*, Credits, GOVERNANCE.MD, Governance.md, HISTORY.MD, History.md, LICENSE*, License*, MAINTAINERS, Maintainers, README*, Readme*, SECURITY.MD, SPONSORS*, Security.md, Sponsors*, authors, backers*, changelog*, citation*, code_of_conduct*, codeowners, contributing*, contributors, copying*, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors*",
    "remix.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, remix.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
    "requirements.txt": ".editorconfig, .flake8, .isort.cfg, .python-version, requirements*.in, requirements*.pip, requirements*.txt, tox.ini",
    "rush.json": ".browserslist*, .circleci*, .commitlint*, .cz-config.js, .czrc, .dlint.json, .dprint.json*, .editorconfig, .eslint*, .firebase*, .flowconfig, .github*, .gitlab*, .gitmojirc.json, .gitpod*, .huskyrc*, .jslint*, .knip.*, .lintstagedrc*, .markdownlint*, .node-version, .nodemon*, .npm*, .nvmrc, .pm2*, .pnp.*, .pnpm*, .prettier*, .pylintrc, .release-please*.json, .releaserc*, .ruff.toml, .sentry*, .simple-git-hooks*, .stackblitz*, .styleci*, .stylelint*, .tazerc*, .textlint*, .tool-versions, .travis*, .versionrc*, .vscode*, .watchman*, .xo-config*, .yamllint*, .yarnrc*, Procfile, apollo.config.*, appveyor*, azure-pipelines*, biome.json, bower.json, build.config.*, bun.lockb, commitlint*, crowdin*, dangerfile*, dlint.json, dprint.json*, electron-builder.*, eslint*, firebase.json, grunt*, gulp*, jenkins*, knip.*, lerna*, lint-staged*, nest-cli.*, netlify*, nodemon*, npm-shrinkwrap.json, nx.*, package-lock.json, package.nls*.json, phpcs.xml, pm2.*, pnpm*, prettier*, pullapprove*, pyrightconfig.json, release-please*.json, release-tasks.sh, release.config.*, renovate*, rollup.config.*, rspack*, ruff.toml, simple-git-hooks*, sonar-project.properties, stylelint*, tslint*, tsup.config.*, turbo*, typedoc*, unlighthouse*, vercel*, vetur.config.*, webpack*, workspace.json, xo.config.*, yarn*",
    "setup.cfg": ".editorconfig, .flake8, .isort.cfg, .python-version, MANIFEST.in, requirements*.in, requirements*.pip, requirements*.txt, setup.cfg, tox.ini",
    "setup.py": ".editorconfig, .flake8, .isort.cfg, .python-version, MANIFEST.in, requirements*.in, requirements*.pip, requirements*.txt, setup.cfg, setup.py, tox.ini",
    "shims.d.ts": "*.d.ts",
    "svelte.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, houdini.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, mdsvex.config.js, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vite.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
    "vite.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
    "vue.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, capacitor.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, ionic.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, panda.config.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*"
  },

Contributing

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!

License

MIT

vscode-file-nesting-config's People

Contributors

abdul-alhasany avatar aminya avatar antfu avatar arneesh avatar baruchiro avatar canyildiz avatar civon avatar daydreamer-riri avatar hannoeru avatar hanssonduck avatar hubvue avatar iamyuu avatar jacobdalamb avatar johncampionjr avatar kidonng avatar liby avatar marcobiedermann avatar mukundshah avatar neoncitylights avatar ntnyq avatar onecentlin avatar qianxi0410 avatar redguy12 avatar replygirl avatar rubiin avatar samydoesit avatar seokminhong avatar shinigami92 avatar spa5k avatar zhmushan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-file-nesting-config's Issues

Update prompt every window reload

Describe the bug

Every time I open a new window or reload the current window, the update prompt appears. Is it just diffing the config block?

Reproduction

I just reload the window

System Info

System:
    OS: macOS 12.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 22.19 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.10.0 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 97.0.4692.99
    Safari: 15.6

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

文件重复显示

Expected behaviour

当某个文件被收纳到某个文件之下时候,只会被匹配一次

Actual behaviour

vue项目中,一些文件会被重复归纳到一些文件下面,如下图:

I'm seeing this behaviour on

  • Mac 10.15.7
  • vscode 1.65.2
  • vue-cli3

It didn't work

I installed the extension: nothing happened.

I reloaded the VSCode: Message about "update" was appear.

I updated the config: nothing happened.

I reloaded the VSCode: still nothing.

image

Publish `File Nesting Updater` to Open VSX

Clear and concise description of the problem

Usage of Microsoft marketplace-distributed extensions in non-MS products is theoretically prohibited.

Suggested solution

Publishing it to Open VSX, to be able to use it on other VSCode-likes (VSCodium for example).

Alternative

No response

Additional context

The docs to publish an extension can be found here (even if I assume that you are already aware of it, given that some of your extensions appears there). This process is straightforward and shouldn't take too long. Essentially, you need an authentication token and to execute the ovsx publish command to publish your extension. There's also a doc explaining the whole process with an example GitHub Action workflow.

Validations

.js.LICENSE.txt files

Describe the bug

Cool project!

I wonder if support for autogenerated LICENSE files should be added.
These are typically created by Webpack, and sit alongside individual .js files.

image

I was able to add it by adding $(capture).js.LICENSE.txt to the *.js group.
Happy to send a PR if you'd like to add this as a feature?

Reproduction

create a a.js file and a a.LICENSE.js.txt file

System Info

N/A

Used Package Manager

n/a

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[Extension] Respect existing choice for "fileNesting.expand" or make it a setting to respect it

First of all, thank you very much for the extension, the idea, and all of your work generally in the JS ecosystem!

In 11f3dc5 the code which checked for the presence of an existing settings for explorer.experimental.fileNesting.expand was removed in favor of always setting it to false.

I may be in the minority given the reason this extension exists in the first place, but I actually prefer to see all of the files by default (i.e. explorer.experimental.fileNesting.expand=true) with the ability to collapse the nesting trees down if I feel overwhelmed.

An ideal outcome to me would be to make "respect existing explorer.experimental.fileNesting.expand selection" an extension setting for File Nesting Updater so that the extension does not override how I have this nesting setting set (also, personally fine if my preference here is not the default, because as I said, I suspect I'm in the minority here).

Alternatively, one could argue that the extension just shouldn't touch this user setting - if a user has it set, or not, it's up to them. This leads to a solution which deletes code and introduces no added maintenance burden. Could also just note that this is a setting users might want to check on in the README and call that good?

For reference, here is a video demonstration of how invocation of the File Nesting Updater update command changes the value of explorer.experimental.fileNesting.expand:

2022-03-15_21-16-21.mp4

Nested filetype pattern for SharePoint Framework (SPFx)

Clear and concise description of the problem

Add nested filetypes for .tsx when using SharePoint Framework (SPFx)

Suggested solution

Change following line (307) in update.mjs:
'*.tsx': '$(capture).ts, $(capture).*.tsx, $(capture)_*.ts, $(capture)_*.tsx',

To
'*.tsx': '$(capture).ts, $(capture).*.tsx, $(capture)_*.ts, $(capture)_*.tsx, $(capture).module.scss, $(capture).module.scss.ts',

Alternative

No response

Additional context

No response

Validations

导致文件夹/文件生成多份

Describe the bug

image

如上图片,很多文件夹和文件,自动被生成了多个,很奇怪。且卸载插件依然存在这个问题。我也在想是不是该插件的问题。

Reproduction

null

System Info

macos:最新款系统

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Dotenv not working with actual patterns

Actually, this rule is'nt working :

".env": "*.env, .env*, env.d.ts",

Capture d’écran 2022-03-09 à 15 08 05

I suppose it's about the *.env pattern, because if I retire it, it seems to work.
Since I don't think that we can have a prod.env or local.env file, may this line be updated?

N.B.: with a nuxt/next/framework repo, all files are well included under the *.config.js file.

fileNesting is no longer experimental under insider version

Version: 1.66.0-insider
Commit: eaa2b431ac259fddf5aa11aa53060a9b70068b29
Date: 2022-03-21T07:22:12.653Z
Electron: 17.1.2
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Darwin arm64 21.4.

Screen Shot 2022-03-22 at 10 28 54 AM

so is it possible to check for that b4 updating the config ?

File gets nested twice under different parents

Describe the bug

I have a webpack.mix.js file in a php project that gets nested under both artisan and package.json files. Clicking on any of the nested files opens the same file.

I'm using the latest version of the extension with no custom config applied.

Screenshot 2023-09-27 110405

Reproduction

Provided a screenshot

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 8.76 GB / 15.93 GB
  Binaries:
    Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.7.6 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Spartan (44.22621.2283.0), Chromium (117.0.2045.43)
    Internet Explorer: 11.0.22621.1

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

When I use the VIM plug-in in VS Code at the same time, I can't expand collapsed files in the directory tree via Enter

Describe the bug

Installed plugins

image

image

The associated file

image

Select and press Enter
Error message

image

Reproduction

This is an application problem, while installing antfu.file-nesting and vscodevim.vim two plug-ins, and select the folded file and press the Enter key to reproduce.

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (16) x64 Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz
    Memory: 16.33 GB / 31.72 GB
  Binaries:
    Node: 16.15.1 - D:\Software\nvm\v16.15.1\node.EXE
    Yarn: 1.22.19 - D:\Software\nvm\v16.15.1\yarn.CMD
    npm: 8.14.0 - D:\Software\nvm\v16.15.1\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.48)

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Suggestion: `*.esproj`

Clear and concise description of the problem

Visual Studio's JS SDK is probably going to be the norm for ASP.NET developers.

Suggested solution

In my opinion it would make sense to inherit from the other JS projects and also include them under the *.esproj:

{
    "*.esproj": "*proj.user, svelte.config.*, vite.config.*, vue.config.*, remix.config.*, quasar.conf.js, nuxt.config.*, next.config.*, angular.json, *.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
}

Alternative

No response

Additional context

No response

Validations

.env files should only under vite.config.ts

Describe the bug

image

Reproduction

see the screenshot

System Info

System:
    OS: macOS 13.0.1
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 238.95 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.18.1 - ~/Library/Caches/fnm_multishells/17118_1670566542068/bin/node
    Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/17118_1670566542068/bin/yarn
    npm: 8.19.2 - ~/Library/Caches/fnm_multishells/17118_1670566542068/bin/npm
  Browsers:
    Chrome: 108.0.5359.98
    Firefox Developer Edition: 104.0
    Safari: 16.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Less (CSS) file under TypeScript React component

Clear and concise description of the problem

I have a TypeScript React component. Using JSX force me to end the file with .tsx.

The style for this component is written in Less, a preprocessor for CSS, and I think it should be nested under the component.

WDYT?

image

Suggested solution

We can add it here, I think:

'*.jsx': '$(capture).js, $(capture).*.jsx, $(capture)_*.js, $(capture)_*.jsx',

But I see that you ask for *.component.ts for components and CSS dependencies.

Alternative

No response

Additional context

No response

Validations

tsconfig.json repeats in remix

Describe the bug

I was using a Remix app and noticed that the tsconfig.json file repeats twice, it is under package.json as well as remix.config.js

Reproduction

npx create-remix@latest

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz
    Memory: 542.18 MB / 7.79 GB
  Binaries:
    Node: 16.14.2 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
    Yarn: 1.22.19 - ~\scoop\apps\nvm\current\nodejs\nodejs\yarn.CMD
    npm: 8.5.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (105.0.1343.53)
    Internet Explorer: 11.0.22000.120

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Merge `Makefile`

Clear and concise description of the problem

I have several project that uses Makefile and associated *.mk files. I'd like to make a permanent change so the config updater has those settings.

  "explorer.fileNesting.patterns": {
    "Makefile": "*.mk",
  }

Suggested solution

Add the following to the update.mjs file:

const base = {
  ...
  'Makefile': '*.mk',
  ...
}

Alternative

Re-adding the pattern matching on every config update.

Additional context

No response

Validations

Just updated the VSCode version and found that they roll out the same features as you

April 2022 (version 1.67)

After the version is updated, it is found that your plugin is invalid. Check the updated documentation and find that VSCode does the same thing Explorer file nesting , copying your configuration to its settings can achieve the same effect as your plugin.

So I uninstalled your plugin, but thank you very much for making this plugin, it has brought me a good development experience for two months.

👍

File naming conventions with an underscore

Hi, I am posting this issue for discussion.
The file naming conventions of some languages are written with an underscore to separate instead of a dot. It would be nice to support this.

Example:

  "*.ts": "$(capture)_test.ts", // for Deno: https://deno.land/manual/contributing/style_guide#use-underscores-not-dashes-in-filenames
  "*.py": "test_$(capture).py",
  "*.rs": "$(capture)_test.rs"

I wonder if we should add only the test files as above or nest all files with an underscore.

.nuxtignore under nuxt.config.ts

Clear and concise description of the problem

.nuxtignore is rarely needed and for this reason adding it under nuxt.config.ts will be nice to have.

Suggested solution

Can we add .nuxtignore under nuxt.config.ts ? :)

Alternative

No response

Additional context

No response

Validations

Nest test files (JS/TS)

There is a convention in JS/TS to name the test file with $(capture).test.js, like this:

image

Do you think we can nest those test files under the main file?

Take `tsx` children files in consideration

Hi!

I love your config, but I was wondering if it was intentional to ignore $(capture).*.tsx in the *.tsx rule ?
Because, with this config, spec files like MyFile.test.tsx would become a child of MyFile.tsx.

I'm asking because this rule is present for ts files.

    "*.ts": "$(capture).js, $(capture).*.ts",
    "*.tsx": "$(capture).ts",

VS

    "*.ts": "$(capture).js, $(capture).*.ts",
    "*.tsx": "$(capture).ts, $(capture).*.tsx",

Thanks

disable enabling `explorer.fileNesting` on each update

Clear and concise description of the problem

first many thanks for this amazing tool, however atm on each update the ext will enable explorer.fileNesting.enabled, which is annoying.

Suggested solution

leave the user settings untouched and only update the config

Alternative

No response

Additional context

No response

Validations

无法自动更新

Describe the bug

{
    "fileNestingUpdater.upstreamRepo": "tjx666/vscode-file-nesting-config",
    "fileNestingUpdater.upstreamBranch": "main",
}

看了一下源码是使用 cdn 获取 readme,但是由于 cdn 缓存,每次手动更新都是拉取旧的内容。

Reproduction

Need not

System Info

System:
    OS: macOS 13.1
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 1.35 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/Library/Caches/fnm_multishells/74893_1671161701687/bin/node
    npm: 9.2.0 - ~/Library/Caches/fnm_multishells/74893_1671161701687/bin/npm
  Browsers:
    Chrome: 108.0.5359.124
    Firefox Developer Edition: 104.0
    Safari: 16.2

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Add `packages.lock.json` supports for `*.csproj` and ``*.fsproj``

Clear and concise description of the problem

When using NuGet RestorePackagesWithLockFile it will generates packages.lock.json near the .csproj or .fsproj file.

Suggested solution

"*.csproj": "*.config, *proj.user, appsettings.*, bundleconfig.json, packages.lock.json",
"*.fsproj": "packages.lock.json"

Alternative

Manually add these rules to VSCode settings

Additional context

No response

Validations

*.knip.* causing VSCode file explorer does not display files

Describe the bug

*.knip.* causing the VSCode Explorer does not display files.

String does not match the pattern of "^([^,*]*?[^,*])(, ?[^,*]*?[^,*])*$".
Each key pattern may contain a single * character which will match any string.

image

Delete *.knip.* and it will return to normal.

image

Reproduction

Open the folder containing package.json using VSCode.

System Info

Visual Studio Code
Version: 1.85.0 (Universal)
Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c
Date: 2023-12-06T18:18:04.614Z (1 day ago)
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 22.6.0  

  System:
    OS: macOS 13.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 282.61 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/Library/Caches/fnm_multishells/42942_1702000371659/bin/node
    npm: 10.2.3 - ~/Library/Caches/fnm_multishells/42942_1702000371659/bin/npm
    pnpm: 8.5.0 - ~/Library/pnpm/pnpm
    bun: 1.0.14 - /usr/local/bin/bun
  Browsers:
    Chrome: 120.0.6099.62
    Safari: 17.1

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

In vscode 1.85.0 version , explorer does not display any files and directories

Describe the bug

In the VSCode 1.85.0 version, the explorer does not display any files and directories when "explorer.fileNesting.enabled": true is set.

image

However, when this setting is changed to "explorer.fileNesting.enabled": false, the files and directories are shown.

image

Is there any rule that affects this behavior?

vscode version info

Version: 1.85.0 (system setup)
Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c
Date: 2023-12-06T20:48:09.019Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.18363

Reproduction

In window10 and then download vscode 1.85.0

System Info

System:
    OS: Windows 10 10.0.18363
    CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
    Memory: 7.67 GB / 15.74 GB
  Binaries:
    Node: 18.16.0 - ~\AppData\Local\fnm_multishells\16564_1702006014106\node.EXE
    npm: 9.5.1 - ~\AppData\Local\fnm_multishells\16564_1702006014106\npm.CMD
  Browsers:
    Chrome: 120.0.6099.71
    Edge: Spartan (44.18362.449.0)
    Internet Explorer: 11.0.18362.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Use onStartupFinished to replace * in activationEvents

see document Activation Events | Visual Studio Code Extension API

onStartupFinished

This activation event is emitted and interested extensions will be activated some time after VS Code starts up. This is similar to the * activation event, but it will not slow down VS Code startup. Currently, this event is emitted after all the * activated extensions have finished activating.

...
"activationEvents": [
    "onStartupFinished"
]
...

"activationEvents": [
"*"
],

File state synchronization problem in workspace

--------------VSCode--------------
Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:42:05.236Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin arm64 21.2.0

--------------PluginExtension--------------
Version: 0.1.1

--------------Issue--------------
When in workspace mode, when the configuration file of workspace 1 is moved to workspace 2, it will not be synchronized in real time.

Example

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.