Skip to content
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

Provide ability to define workspace specific settings from outside the workspace #851

Closed
weeblr opened this issue Dec 1, 2015 · 11 comments
Labels
config VS Code configuration, set up issues feature-request Request for new features or functionality workbench-multiroot Multi-root (multiple folders) issues

Comments

@weeblr
Copy link

weeblr commented Dec 1, 2015

Hi

When I open a git-controlled folder, and possibly change some settings, then Code creates a .vscode directory directly inside that folder, and stores files such as settings.json or launch.json in it.

That folder either has to be checked in or .ignored, which is OK on repos I control, but not OK on forked repos I want to contribute to for instance, which needs to stay clean.

Can't this data be stored in some Code own data folder?

Cheers

@bpasero
Copy link
Member

bpasero commented Dec 1, 2015

These things are workspace related settings so they are stored in the workspace folder with the intent to share them to other people (e.g. a launch configuration is typically OS and path independent).

You don't have to create workspace settings, there is also user level settings. For launching and tasks however, these files are stored within the workspace.

@weeblr
Copy link
Author

weeblr commented Dec 1, 2015

I get your point. Indeed making that workspace specific settings live inside the folder makes it shareable.
But it does mean I cannot use workspace-specific settings and launch configuration on repos I don't control.

Intelij IDEA stores that meta data either in the workspace folder or in a separate, IDE-owned, folder so that repos are kept clean.

Cheers

@alexdima
Copy link
Member

alexdima commented Dec 1, 2015

@weeblr Here is a nice trick I use for this 😉

Edit .git/info/exclude and add .vscode

Hint: works like a .gitgnore file sitting in the root of the repo, but that is not checked in the repo

@alexdima alexdima added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Dec 1, 2015
@alexdima alexdima closed this as completed Dec 1, 2015
@weeblr
Copy link
Author

weeblr commented Dec 1, 2015

Hi alexandru,

thanks for the tip. Nice workaround. That doesn't really change anything to the problem however. That folder will still be included in tar balls and such.

vscode should just leave the edited code alone.

Cheers

@alexdima
Copy link
Member

alexdima commented Dec 1, 2015

@weeblr fair point

@alexdima alexdima reopened this Dec 1, 2015
@alexdima alexdima added feature-request Request for new features or functionality and removed *question Issue represents a question, should be posted to StackOverflow (VS Code) labels Dec 1, 2015
@felixfbecker
Copy link
Contributor

This should be closed as working as intended

@alexdima alexdima changed the title .vscode folder is created in opened folder, dirtying version controlled file Provide ability to define workspace specific settings from outside the workspace Dec 1, 2015
@egamma egamma modified the milestone: Backlog Dec 10, 2015
@bpasero bpasero self-assigned this Mar 30, 2016
@bpasero bpasero removed their assignment Aug 17, 2016
@fr43nk
Copy link

fr43nk commented Jan 31, 2017

This would be a nice feature. My project is connected to network drive. This contains folder which are writeable but the root is read only so the vscode has no chance to store the settings file.

@bpasero
Copy link
Member

bpasero commented Jan 31, 2017

We are planning to support this eventually, stay tuned 👍

@bpasero bpasero added the config VS Code configuration, set up issues label Jan 31, 2017
@fleps
Copy link

fleps commented Aug 17, 2017

Any news on this? Have the same issue, need to configure some nice-to-have VSCode tasks but can't do that because it creates a .vscode folder inside my shared workspace/repo where I can't edit the gitignore =(

@MathiasMagnus
Copy link

MathiasMagnus commented Jan 8, 2018

Just as a comment, in case someone would not open the mentioned issue (#41139) consider the use case depicted there. My launch.json may look radically different on Windows and inside WSL.

In my actual case it's just the type of the C++ debugger and the paths to files in command-line arguments, where in one case it's C:\Users\... and in the WSL case /mnt/c/Users/.... If others have targets for publishing code, that will look totally different though, packaging and publishing for a Chocolatey repo and an Ubuntu PPA certainly look and feel different.

Duplicating the source tree only to make room for two launch.json and two settings.json is tedious. Plus it bring the added aggravation of fixing one issue on Windows/MSVC and if I want to check whether it wrecked builds or introduced warnings on Ubuntu(WSL)/GCC I have to migrate commits by pushing to a repo visible by both. It's just not productive.

@sandy081
Copy link
Member

sandy081 commented Apr 5, 2018

This can be solved by using new Workspace (Multi-root) concept. You can open the folder in a workspace as follows:

  • New Workspace
  • Add Folder

And, settings and debug configurations will be local and no .vscode folder is created in the added folder. If you want to reuse the configuration, you can save the workspace (locally).

Closing this in favor of using Workspace.

@sandy081 sandy081 closed this as completed Apr 5, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
config VS Code configuration, set up issues feature-request Request for new features or functionality workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

9 participants