How can I make index.ts always appear at the bottom in VS Code Explorer without breaking folder imports?
12:01 13 Nov 2025

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:

  1. Changing sort order:

    "explorer.sortOrder": "type"
    

    Works for grouping by type but doesn’t push index.ts to the bottom.

  2. Disabling file nesting:

    "explorer.fileNesting.enabled": false
    

    Shows all files flat, but still sorts index.ts normally.

  3. File nesting workaround:

    "explorer.fileNesting.enabled": true,
    "explorer.fileNesting.patterns": {
      "!(index)": "index.ts, index.tsx, index.js, index.jsx"
    },
    "explorer.fileNesting.expand": true
    

    Keeps index.ts visually last, but nested (indented), not flat at the bottom.

  4. I don’t want to rename the file (like _index.ts or zzz.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.

visual-studio-code