zokugun / vscode-sync-settings

Easily synchronize your settings
MIT License
146 stars 12 forks source link

When I download repository, my snippets and settings.json don't updated. #46

Open sunerpy opened 1 year ago

sunerpy commented 1 year ago

I have a problem. After I upload the settings and snippets to github on computer A, I use sync settings to download from computer B, and I find that it is only downloaded to /config/data/User/globalStorage/zokugun.sync-settings/repository path, and my actual snippets are located under /config/data/User/snippets, these settings are not updated. Is there a problem with my use? /config is the home directory of the user who runs code-server on computer B。

daiyam commented 1 year ago

It's due, I think, that the remote mode is enabled.

Remote mode is supported but the synchronization will be limited to only extensions.

from https://github.com/zokugun/vscode-sync-settings#remote

I haven't tested code-server.

triple-j commented 1 year ago

I have confirmed that "remote mode" is the problem when running this in linuxserver/code-server. I manually updated the extensions/zokugun.sync-settings-0.16.0-universal/lib/index.js file so that the remote member of the Settings class would always be false. That allowed the other resources (settings, keybinding, etc.) to be synced.

@daiyam I don't know much about vscode extensions, so what is the reason for the remote mode being restricted to only sync extensions?

daiyam commented 1 year ago

The other resources are related to the local UI so there is no need the sync them on the remote (they won't be used by the server).

jakob42 commented 1 year ago

I have confirmed that "remote mode" is the problem when running this in linuxserver/code-server. I manually updated the extensions/zokugun.sync-settings-0.16.0-universal/lib/index.js file so that the remote member of the Settings class would always be false. That allowed the other resources (settings, keybinding, etc.) to be synced.

Do you have a diff? I also ran into that problem when I wanted to sync my local settings to my lsio/code-server instance

daiyam commented 1 year ago

Oh! code-server a client/server package where client is in the browser. So the sync is used to save the client's config but it run as in the remote mode which sync only extensions. Is that correct?

Maybe you can force it to run in the UI, maybe???

"remote.extensionKind": {
    "zokugun.sync-settings": [
        "ui",
    ],
},

The remote mode is flagged with context.extension.extensionKind === ExtensionKind.Workspace. The ExtensionKind are type ExtensionKind = 'ui' | 'workspace' | 'web';.

I will need to test the web mode of vscode and code-server to understand what's going on. No timeline, so feels free to make a PR if you want ;)

jakob42 commented 1 year ago

Thanks for looking into it (it goes without saying that you dont have to!)

I forced it into the UI and got "This extension is disabled because it is defined to run only in code-server for the Desktop. Learn more"

I'm not that versed with the code-server myself, just installed it yesterday and wanted to find a way to have my local config in sync with it. @triple-j seems to be using the same docker image as me, https://docs.linuxserver.io/images/docker-code-server/.

Aetherinox commented 5 months ago

@jakob42 Sorry to ping, but did you ever figure out a way to sync the settings.json file? I'm using the official code-server docker image. It syncs the extensions file fine, but not the settings.json. And I even tried manually adding the file to the syncSettings.additionalFiles table and it makes no difference. Refuses to sync.

The Sync Settings plugin is dead, so this is my last hope since normal syncing via the cloud in code-server doesn't work.

jakob42 commented 4 months ago

Sorry, missed your comment @Aetherinox No, I never got it working right and stopped using code-server. It wasn't important, just to be able to get some stuff done while on shared computers. But that doesnt happen that often nowadays...