-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow a workspace to show individual files from other folders #45177
Comments
I seem to be able to add files to the 'workspace' by just using file > open. However, they don't show in the workspace side bar, so can't do things like rename when doing versioning numbers. Also 'gitlens' doesn't seem to track them either. |
Or, to put this in different words: |
I've had the same issue this week where I've altered the structure of my solution so that i only have single package.json and tsconfig.json in the root of my solution, where previously there were multiple of both package.json and tsconfig.json located inside of a corresponding 'App' folder, this meant in my workspace i could add each 'App' folder and vscode would be happy - no errors. Now that I've changed the structure to have a single package.json and tsconfig.json which handles each app the workspace does not include the files due to them now being located in the root which leads to ts errors in my files. The only workaround i have currently is to include my entire solution which isn't very desirable. Having the ability to add individual files to the workspace means i could retain a workspace that only has my desired files in but means i could include the necessary files to not have errors. |
|
Yes please. Due to the setup of the repository I'm working in, a particular project might have its own subfolder but also has to have a package file at root-level. Would be great to have the package as part of the workspace. |
And i would say even more. Due to the project specific that i'm working on, i have several c# projects in the several folders that included into one visual studio solution. And there are hundreds of xml files in this folders that can't be made as part of solution. |
I am closing this "as designed". This is not a scenario we will support anytime soon. Please also see https://github.com/Microsoft/vscode/wiki/Issue-Grooming#out-of-scope-feature-requests |
It's ridiculous that you aren't doing this. Not doing it defeats most of the purpose of having workspaces. |
@bpasero I have to wonder if the bar isn't being set a bit high. There's an under-diiscussion label for bugs. Maybe the same is required for feature request. @Others since contributing to this thread have wondered at times if it is actually desirable:
|
Looking at the criteria in https://github.com/Microsoft/vscode/wiki/Issue-Grooming#out-of-scope-feature-requests, I'm a little confused why this was closed.
This doesn't really seem to be a criterion on its own. It's very dependent on (2) and (3).
If allowing some loose files or folders at the same level as project folders has a particular high cost, it would be helpful to get a brief explanation why that is the case. The project folders themselves would seem much more complicated to implement, given all the special UI treatment they get. I would also argue that allowing a .vscode folder for the whole workspace, rather than embedding settings and launch configuration into the code-workspace file and ignoring certain settings set at the project-level that conflict (like zoom), you would end up with a much cleaner, "fully baked" system.
This post has 28 upvotes in the last seven months and this comment will be the 10th. Would the team consider giving this one more look? EDIT: better make that 125 votes and counting, as of 11 MAY 2020. |
30th Upvote. I was very glad to start using workspaces, instead of having my entire root folder in VS Code which has word documents and crap. I was able to just have the main folders I code in (Web, API, and DB for this main project I'm on). I was surprised to find I couldn't add a couple other files to the workspace that would be nice to show up right next to the main folders. Specifically Readmes would be nice and also I like to put the API .sln there so I can quickly go to view it in explorer and open it in VS (I avoid going in there). Anyway, this seems like it would obviously be on the roadmap to go along with Workspaces as they are. If there's a ton of other backlog more important I'd get a delay but to close this seems wrong. If a workspace files feature is so far down on the list that it will never get done, then workspace folders should be right there with it and shouldn't have been done. I'm not following the logic that implementing with folders was important enough to do and just stop there... |
Thanks for suggesting Symlinks, I ended up going this route as well for a workaround and it's not too bad, basically achieves what I was trying. I added a "Links" folder to my workspace which just has a list of Symlinks to files I wanted to include in the workspace. |
There does seem to be interest for this feature. |
@MrGoDuck @TuxVinyards Yeah, that would work and offers plenty of flexibility - I would absolutely be in favor of that. PS - My hard links are breaking (not sure which app is overwriting files but it happens - I hope it's not VS Code). So I had to get rid of my "Links" folder. I am back to just searching for the files I'm looking for when I'd ultimately like hard links in the root, included in the workspace. Ex of the ideal: API A bit unrelated but it seems like VS Code might be the one breaking my hard links...! I had the two links in a "Links" folder included in the workspace and it was working perfectly for a session and then broke. I didn't open the files in any other app. |
@MrGoDuck Sounds like the start of an algorithm. What are you like at Typescript? Might work adding lines to the .jsn. manually .. Not tried the above. @MrRobboto my symlinks method is still working for me. Maybe VS Code doesn't play nicely with links? I have only 'real' files in the working folder. The outside files as links works but does have limitations. Maybe an OS issue? |
I found it hard to believe I could not add files to my workspace. Please reconsider this feature request. |
I too found it ridiculous that this was not a feature. |
Yes. Please add the ability to add individual files to the workspace. |
+1 |
Please add the ability to add individual files to the workspace by some pattern (e.g. *.txt).
Thank you.
Best regards,
Ivan Grechko
On Wed, Nov 28, 2018 at 11:25 PM +0300, "safield" <[email protected]> wrote:
+1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
+1 MS PLZ I have a walk around:
|
@EstevezCarlos |
FWIW I built a personal extension. Haven't posted it b/c of its limited scope, but the basic idea is this: The original plan was to create a panel whose file list would be populated
I got as far as the "Files" array, it worked, and discovered the others weren't even needed, at least not immediately, so to date haven't gone back and elaborated the extension. Haven't used the built-in Workspace panel since. In the end it would seem there's probably no need to even distinguish between "Folders" and "Files" or even a "Regex" arrays. They could all be listed in one array, and a bit of coding could figure it out. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Thanks, @tschoepping, for the stack overflow answer. I have used it to do this walk arround : So I add the "folders" I want and the folder with everything too (the last "folder") Then I ignore everything except the ones I want. In this case "package.json" but It will be in another "workspace folder" (the one I named Project folder) |
I use projects with just a few files all the time - it is often required to make changes in a group of functionally related files that live in completely different places. Another common use is top level code (perl/python/bash etc.) that uses a relative library dir, but itself lives amongst a bunch of other executables. I am a recent convert to vs code after decades of using bbedit - for an example of how individual files can work easily and powerfully in a workspace, take a look at bbedit's implementation (they call them projects) - it is excellent and shows that it can be done without any UX confusion. I greatly prefer this approach over using hard or soft links as they always seem to bite me on the bum eventually... |
I would really appreciate it if you were to release this. |
I use this approach and I think it's not workaround. I think this is the correct way. This way, there's a choice whether user wants to use Multi Root Workspaces or not without headache. @bpasero, CMMIW but I think this approach should be on documentation. |
To me, it seems like a temporary workaround. The list of "files.exclude" could get very long and this setting applies to every folder so you could inadvertently exclude a "file" (or folder) somewhere else in your project. |
I agree, the whole reason for wanting to include only particular files is because of the swathe of other files in a folder I'd otherwise include. |
This looks like another workaround to me. |
Unbelievable that this isn't addressed yet |
Actually shocking that this isn't implemented yet. Seems so simple |
+1 would be great to see |
+1 - (Can't believe this has been open for 6 years O.o) I have a single folder "python" that I use to mount into a Docker container. The folder includes multiple files (the entire reason I need this feature):
and then I have multiple sub-directories that each have their own However, those launch configurations don't show up unless the folders are added as a multi-root workspace... Then the dillema is I can't see the files in the root "python" folder when I do that. (I currently have them inside of a single |
What kind of confusion would adding a feature that people have been asking for for years entail? Workaround: No confusion at all, but the extra effort should not be necessary. I should be able to add something like this to my.code-workspace: "folders": [ ], Could anyone explain why the vscode development community has been reluctant to add this feature? |
I’ve started using this workspaces but damn yeah this is really missing feature. |
THANK YOU! I didn't think of symbolic links and this works perfectly. |
How many singular files we have these days to compliment our programming? All the files that start with the dot and so on. It would be extremely useful to have access to files that pertain to our folders and repositories but are stored outside of it |
^per the above i use all these config files frequently and it would be incredibly handy to have this feature. |
Hey @dlordi, FYI, symbolic links work just fine. |
Sure they do, but I feel markdown makes a project more manageable, ie: it can be add to a project versioning, inner project file links are usable in both Win and Linux/Mac, you can have different heading sections that match your logical project structure, each one listing its more relevant files, etc... Anyway, its just an hack: really hope VSCode team will address this issue sooner or later. |
Please implement this Microsoft. Seems the most basic of functionality. |
Update from @bpasero: this issue was renamed based on the discussion at the end (see #45177 (comment) and above)
Original below:
Steps to Reproduce:
N/A
Does this issue occur when all extensions are disabled?: Yes
Currently, .code-workspace only contains
folders
field which allows to add folders into workspace. I prefer a way to add single files into workspace for the entire project, such as README or something else.The text was updated successfully, but these errors were encountered: