I’m using VS Code and I want my folder’s index.ts file to always appear at the bottom of all other files in the Explorer panel — purely for visual organization.
For example, instead of this:
- index.ts
- app.ts
- utils.ts
- types.ts
I want this:
- app.ts
- utils.ts
- types.ts
- index.ts
I’ve already tried a few approaches:
Changing sort order:
"explorer.sortOrder": "type"Works for grouping by type but doesn’t push
index.tsto the bottom.Disabling file nesting:
"explorer.fileNesting.enabled": falseShows all files flat, but still sorts
index.tsnormally.File nesting workaround:
"explorer.fileNesting.enabled": true, "explorer.fileNesting.patterns": { "!(index)": "index.ts, index.tsx, index.js, index.jsx" }, "explorer.fileNesting.expand": trueKeeps
index.tsvisually last, but nested (indented), not flat at the bottom.I don’t want to rename the file (like
_index.tsorzzz.index.ts) because that breaks the Node import behavior:import './folder' // only works with exact "index.ts"
So my question is:
Is there any native VS Code setting or extension that can make index.ts appear at the bottom (not nested) while keeping its functionality as a folder entry point?
Any reliable workaround or setting tweak would be appreciated.