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.

Allow/use folder name when opening file in multi-root workspace

See original GitHub issue

Context

We have a mono-repo with multiple Dart code projects which are each in their own folder directly under the root.

For optimal tooling support we use a “multi-root workspace”.

The file structure looks like this:

/
 a/
   foo.txt
 b/
   bar.txt

The Problem

Trying to open a/foo.txt from the quick open menu (<kbd>CMD</kbd> + <kbd>P</kbd>) leads to 0 results.

Feature Request

Tooling in the CLI as well as the paths in PRs on GitHub often reference the “local” paths inside the repository, e.g. a/foo.txt which also maps 100% with the file layout in the VS Code explorer.

Unfortunately when pasting a/foo.txt into the file open (<kbd>CMD</kbd> + <kbd>P</kbd>) dialog, it doesn’t show any results. When using just foo.txt the correct file in a/ is offered.

I think it would be nice to have these “perfect matches” offered to open directly.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bpaserocommented, Jul 6, 2021

I believe the underlying issue is that we take the user typed query string from quick open and run it over all folders that are known to the multi root workspace. We would probably have to detect that the user has put the name of a root workspace and remove that from the search string? Or maybe we could trick Ripgrep into understanding that a root workspace has a certain prefix (name) that should be taken into account?

1reaction
bpaserocommented, Jul 6, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-root Workspaces in Visual Studio Code
The File > Add Folder to Workspace command brings up an Open Folder dialog to select the new folder. Add Root Folder. Once...
Read more >
Allow a workspace to show individual files from other folders
Currently, .code-workspace only contains folders field which allows to add folders into workspace. I prefer a way to add single files into ...
Read more >
How to rename a multi-root workspace inside vscode?
in the .code-workspace file you can set a name for each folder that is part of the Multi Root Workspace. You have to...
Read more >
VS Code tips — Multi-root workspaces - YouTube
Today's VS Code tip: Multi - root workspacesMulti- root workspaces let you work with multiple folders in the same VS Code window.
Read more >
Configuring project structure | WebStorm Documentation
Configuring folders in a content root · Excluding files · Excluding files and folders by name patterns · Working with multiple content roots....
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