microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.58k stars 28.66k forks source link

Same file nested under two different files cannot be renamed #176107

Open babakfp opened 1 year ago

babakfp commented 1 year ago

Does this issue occur when all extensions are disabled?: Didn't check

Hi

You can see 2 files with the same name .prettierrc.cjs:

Screenshot 2023-03-03 184413

Link to video: https://drive.google.com/file/d/1T83sGhIZCk4VGOxpxXkwfKclxXaSVah1/view?usp=sharing

Config:

"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"package.json": "package-lock.json, pnpm-lock.yaml, .pnpm-debug.log, .npmrc",
"tailwind.config.cjs": "tailwind.config.full.cjs, postcss.config.cjs",
"svelte.config.js": "vite.config.js, vite.config.js.timestamp-*.mjs, vite.config.ts, vite.config.ts.timestamp-*.mjs, jsconfig.json, tsconfig.json",
".env": ".env.example",
".prettierignore*": ".prettierrc.cjs"
},
"explorer.fileNesting.expand": true,
"explorer.compactFolders": false,

Steps to Reproduce:

  1. Include the config
  2. Add those 4 files to your workspace
lramos15 commented 1 year ago

You're telling it to put it under both prettier ignore files. Does a more restrictive nesting setting give you the expected behavior?

babakfp commented 1 year ago

Hi

Does a more restrictive nesting setting give you the expected behavior?

What do you mean?

Some may say this can be a cool feature, and that's fine but the problem is, you can't rename the file:

https://user-images.githubusercontent.com/44144724/224739112-f78cdc80-3c7a-4e12-935e-22d30759abbc.mp4

I didn't test other shortcuts. You can't also rename the file by using the right-click menu.