As mentioned in the ideas list, this idea caught my attention, I have been wondering how this would look like if implemented, according to my research the whole idea can be broken into 3 parts:
- Sync normal settings
- Sync plugins
- Sync keyboard shortcuts
Here is a doc on how VS code sync settings work
We will be having options in the settings to turn each of the 3 sync on/off.
Not all settings should be or can be synced, we can sterilise the settings that needs to be synced and save it to the sync target (i.e the cloud storage) as a file, there will be a single global .json file in the target which all participating devices will read and update. Some settings might even be platform dependent, we need to take care of that too.
Plugins
We should be storing and maintaining a list of plugins that will be or is installed in all devices, either on the same file or a different one and install/uninstall plugins accordingly but what if someone who has plugin sync turned wants to add a plugin to a particular device without affecting other devices? It is something that needs to be considered too?
Keyboard Shortcuts
This is something very platform dependent, we might structure our json file in a way to allow for different values for different platforms for the same command, that would fix it. The previous issue of plugin pertains here too, should we allow for specific key bindings to be local only? Or specific keybindings to be disabled on remote but keep it on target.
Maybe we can do something similar to how .gitignore works, but this will only complicate the task (maybe we can keep it for later)
I was able to pin out the file where most of the work will go (or start from in a way), I noticed there are 3 parts of synchronisation: 'update_remote', 'delete_remote', 'delta' and I propose to add another one to the list something like fetch_settings
which will be doing all the work here.
Let me know what you all think and if I'm missing something here.
Edit:
Thinking more about it, it won't be as simple as maintaining a global file of config, we will need a proper way to generate diffs and update according to the timestamp.