9

I'd like to check a version of VSCode's settings.json into our team's git repo while still allowing for individual devs to add their own settings on top of that (i.e. in case they want to configure some extension they're using). Is it possible to tell VSCode to look at two different files? I.e. settings.json and settings-local.json, where settings-local.json is git-ignored.

0

3 Answers 3

2

Use code --user-data-dir /path/to/user/data/dir to run vscode. VS Code will automatically generate some folders in the selected directory, and settings.json will be located in: SELECTED_DIRECTORY/User/settings.json.

Sign up to request clarification or add additional context in comments.

5 Comments

How can I switch between the different user configurations? Running from desktop shortcut will launch VSCode with the default settings, but how to run it with the custom settings created the way you described in your answer?
@youssef You can edit the shortcut. What's your OS?
@youssef On xfce4: xfce4-terminal -e 'code --user-data-dir /path/to/user/data/dir'
Thanks for the info! Also found these links which gave me a bit more info now that I know what I'm searching for: code.visualstudio.com/docs/editor/… and github.com/Microsoft/vscode/issues/7243
This doesn't solve the question, because it doesn't explain how to combine several settings.json.
0

Local settings overrides (settings.local.json) · Issue #37519 · microsoft/vscode https://github.com/Microsoft/vscode/issues/37519#issuecomment-344414444

This is a tip from a member of vscode developers.

2 Comments

not working (-1).
0

The accepted solution didn't work for me. As of Oct 16th, 2023, on a Mac, you can edit: ~/Library/Application\ Support/Code/User/settings.json a.k.a Users/myusername/Library/Application\ Support/Code/User/settings.json to achieve the desired functionality the OP needs.

I found this post because we have the same thing - our multi-contributor app, our-app/settings.json is version controlled and it was driving me bonkers not able to change workspace colors. Apparently you can also find this in Command menu with open user preferences JSON. This may be the way for Windows

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.