Hirerarchical multi-root layout
See original GitHub issueCurrently, the ‘folders’ field of a .code-workspace
configuration file is an array of items, each of them defining a folder. Then, all of these are shown as level-1 items in the default File Explorer. I suggest to support nesting ‘folder’ items with arrays, which will be layout as level-1, level-2, level-3, etc. For example:
{
"folders": [
{
"name": "Project A",
"folders": [
{
"path": "prjA/dirA",
"name": "Dir A"
},
{
"path": "prjA/dirB",
"name": "Dir B"
}
]
},
{
"name": "Project B",
"folders": [
{
"path": "prjB/frontend/src",
"name": "Frontend"
}
{
"name": "Backend",
"folders": [
{
"path": "prjB/api",
"name": "API"
},
{
"path": "prjB/lib/src",
"name": "Library"
}
]
}
]
},
{
"path": "common",
"name": "Common"
}
]
}
which would translate to the following File Explorer structure:
- Project A
- Dir A (prjA/dirA)
- Dir B (prjA/dirB)
- Project B
- Frontend (prjB/frontend/src)
- Backend
- API (prjB/api)
- Library (prjB/lib/src)
- Common (common)
Related to #74229, I believe that the most straighforward integration with this feature would be an option in the settings to display each level-1 item in a separate File Explorer View.
Alternatively, a group
field can be added to each item defined in the multi-root configuration file (be it a folder or an array). All the items with the same group
identifier belong to a separate TreeView.
Ref #76902.
Related to #76399, the group
concept above would translate to an Editor Group. Hence, the shown tabs in a given Editor Group will depend on the ‘location’ (‘group’) of the currently active document.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:90
- Comments:6
Top GitHub Comments
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
I’ve upvoted as similar to https://github.com/microsoft/vscode/issues/87887 but really hope this could be complemented by repo auto-mapping where repo (folder) locations in a workspace are auto-detected on launch and no fixed mapping needs to be maintained. See https://github.com/microsoft/vscode/issues/87888 and please consider upvoting this.😀