-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Description
It would be very helpful for somebody attempting to sync config files between multiple machines if VSCode supported some system for having multiple config files included at a time.
Benefits:
Imagine a config folder structure like this on a developer's mac:
- settings.json -> ~/Drive/dotfiles/settings.json
- settings.local.json -> ~/Drive/dotfiles/settings.my-mac.json
And then like this on a developer's linux desktop:
- settings.json -> ~/Drive/dotfiles/settings.json
- settings.local.json -> ~/Drive/dotfiles/settings.my-arch.json
Using symlinks, then, a developer would be able to have specialized configuration files for each computer, while keeping the vast majority of options synced between both.
Implementation:
I can think of two simple ways to implement this with as little friction as possible.
- An
editor.includeConfigoption in the mainsettings.json
This might be a JSON array, with support for various different config files. It could also just be a single field.
Whether or not the option should be recursive is up to the VSCode team. - VSCode searches for all config files in the directory matching
settings[.foo].jsonand includes those.
Conflicts:
If going with option (1) above, conflicting config entries should take precedence the later they appear in the includeConfig array.
If going with option (2), the main settings.json file should take precendence.