Open ardayigit opened 2 months ago
Hi @ardayigit, thanks for the request!
I am not seeing any options for sorting files in VS Code's "Explore" panel. Can you share some more information about how you are doing this so that we can determine if and how we can hook into this mechanism?
Hi @dklilley!
For sorting order, you can search "explorer sort" in Settings (see screenshot). It uses the class "FileSorter" in "vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts" in the GitHub repo https://github.com/microsoft/vscode.
Thank you for the extra info!
Unfortunately, taking a look at the code, it looks like this sorting behavior is not currently extensible. Sorting by type appears to strictly sort based on file extension, and does not provide a mechanism to add additional logic.
I have opened an enhancement request for VS Code to provide a mechanism for extending the sorting behavior (microsoft/vscode#228355), which will be required for this enhancement to be made.
Thank you for your time!
Is your feature request related to a problem? Please describe. I appreciate the "Group by type" option in the "Current folder" browser to easily distinguish scripts, functions and other file types. Since both scripts and functions use the same extension, sorting by type doesn't yield an equivalent result.
Describe the solution you'd like Adding a custom sort order that distinguishes scripts and functions.
Describe alternatives you've considered As a workaround, all my script files have a name starting by "script", and all functions "fcn", so they are sorted together.