Configurable Project Panel sorting: folders-first/files-first/mixed + custom sort key & direction #37898
Else00
started this conversation in
Feature Requests
Replies: 2 comments
|
It turns out there's a setting for this now, |
0 replies
|
I’d like to implement a limited type sort key: sort files by extension, use the current name comparator as a tie-breaker, and retain existing sort_mode behavior for files and directories. Is this still a direction the project would accept as a contribution? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Today the Project Panel always groups folders before files and sorts A→Z. That’s great for some workflows, but others benefit from seeing files and folders interleaved (or even files first). This request proposes making the Project Panel’s sort behavior configurable.
Problem
Button.tsxsits next toButton/), or when scanning recent edits.Proposed solution
Add settings under
project_panel.sort.*:project_panel.sort.mode:"folders_first"(default),"files_first","mixed"(no prioritization; folders and files sorted together).project_panel.sort.key:"name"(default),"modified_time","type"(by extension/MIME-ish),"size"(optional).project_panel.sort.direction:"asc"|"desc".project_panel.sort.natural:true | false(enable natural/human sort so2 < 10).project_panel.sort.case_sensitive:true | false(defaultfalse).project_panel.sort.folder_time:"self"(use the directory’s own mtime) |"aggregate"(use max mtime of any descendant). Default"self".Example
settings.jsonsnippet:{ "project_panel": { "sort": { "mode": "mixed", "key": "modified_time", "direction": "desc", "natural": true, "case_sensitive": false, "folder_time": "self" } } }UX ideas
Backwards compatibility
mode: "folders_first",key: "name",direction: "asc",natural: false.Alternatives / Workarounds today
⌘P/Ctrl+P) for quick navigation when the tree order isn’t ideal.Edge cases
type, define a stable tie-breaker (namethenmodified_time).size, computing directory sizes can be expensive—consider lazy or cached calculation.Related
Thanks for considering this enhancement! It would make Zed friendlier across a wider range of project shapes and personal workflows.
All reactions