question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hirerarchical multi-root layout

See original GitHub issue

Currently, 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.


Ref #31308. Ref #43188. Ref #73312. Ref #76891.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:90
  • Comments:6

github_iconTop GitHub Comments

15reactions
vscodebot[bot]commented, Jan 16, 2020

🙂 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!

3reactions
markm77commented, Jan 16, 2020

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.😀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hierarchical Layout - jsPlumb Toolkit Edition
The Hierarchical layout uses the Walker algorithm to position nodes/groups in a hierarchy, oriented either vertically or horizontally. The classic use cases for ......
Read more >
Optimize layout hierarchies
Revise your layout​​ A RelativeLayout as the root node allows for such layouts. So, when this design is converted to use RelativeLayout ,...
Read more >
Multiple root items in the chart - JavaScript
Multiple root items are convenient to display tree structure having missing parent relations for some nodes. The control would render such hierarchy using ......
Read more >
Hierarchical Layout | yFiles for HTML Documentation
The hierarchical layout style aims to highlight the main direction or flow within a directed graph. The nodes of a graph are placed...
Read more >
API Reference ▸ Layouts ▸ Hierarchy Layout
The hierarchy layout is an abstract layout that is not used directly, but instead allows code sharing between multiple hierarchical layouts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found