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

Allow storing settings outside of working directory #56148

Closed
remcohaszing opened this issue Aug 10, 2018 · 11 comments
Closed

Allow storing settings outside of working directory #56148

remcohaszing opened this issue Aug 10, 2018 · 11 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@remcohaszing
Copy link
Contributor

I use git for version control. I regularly type git clean -xdf from muscle memory, so I can work in a pristine environment, for example when switching branches.

Often I totally forget about my .vscode directory, so I will need to restore them manually. Of course it is possible to use workspaces instead, but it’s so convenient to just use code . from the terminal. It would be a shame to give this up.

My idea is to offer a different location for these configurations, which will be loaded when a directory is loaded, like .vscode, but outside of the version control.

Some potential locations:

  • .git/vscode
  • $XDG_CONFIG_HOME/Code/Projects/${dirname}
@vscodebot vscodebot bot added the git GIT issues label Aug 10, 2018
@joaomoreno
Copy link
Member

Why don't you check in the .vscode to your repository? Or set the settings in your user settings file?

@joaomoreno joaomoreno added info-needed Issue requires more information from poster and removed git GIT issues labels Aug 10, 2018
@remcohaszing
Copy link
Contributor Author

Editor specific files don’t belong in version control. A code base should be editor agnostic.

Some settings might be related to just one project, such as debugging configurations.

@joaomoreno
Copy link
Member

joaomoreno commented Aug 10, 2018

You seem to be in a pickle then, don't know anyone else struggling with this issue. I suggest putting the settings somewhere in your code and make a bash alias/script which simply symlinks it to $PWD/.vscode/settings.json, so you can always restore them after git clean.

@remcohaszing
Copy link
Contributor Author

I have seen plenty of pull requests of people adding unwanted editor related files. Sometimes these get accepted, cluttering the code base, other times they get rejected. This is not just a VSCode issue, but by storing editor settings in the project root, VSCode has become part of the problem.

For example, I think the majority of the VSCode team wouldn’t be fond of a pull request which adds for example.project, .idea, .tern-config, or package-lock.json to the repository (or gitignore).

Despite the fact that I use and like VSCode, .vscode is no different from those files.

@joaomoreno
Copy link
Member

@bpasero Do we have a dupe of this?

@bpasero
Copy link
Member

bpasero commented Aug 16, 2018

@sandy081 might know. The best is to create a workspace file and store settings in there.

@sandy081
Copy link
Member

#40233

@remcohaszing
Copy link
Contributor Author

@bpasero Creating a workspace file is a workaround, but that does mean one would need to run code path/to/workspace.code-workspace instead of code path/to/project, which in practice is as simple as code . 99% of the time.

A solution could be to resolve a matching workspace file when code path/to/project, although that might cause other issues when this behaviour is undesired.

@sandy081 This is not a duplicate of #40233.

That issue is about committing partial VSCode configuration.

This issue is about moving project configuration outside of the git tracked files.

Actually, the solution from the other issue still suffers from the problem described in this issue.

@joaomoreno
Copy link
Member

@remcohaszing Please read #40233 once again. I believe this is exactly what you are looking for.

@joaomoreno joaomoreno assigned sandy081 and unassigned joaomoreno Aug 20, 2018
@sandy081
Copy link
Member

@remcohaszing Using workspace is a workaround to avoid sharable workspace settings. But #40233 is meant to support non sharable workspace settings.

@sandy081 sandy081 added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 20, 2018
@vscodebot
Copy link

vscodebot bot commented Aug 20, 2018

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Aug 20, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants