gitpod-io/gitpod

VSCode sync with local installation

yajo opened this issue · 23 comments

yajo commented

I'd love a way to sync settings from gitpod’s VSCode to my local VSCode installed in my laptop. That would provide an even more familiar workspace for me, with all the snippets, keybindings and extensions I’m used to.

Tasks

VS Code currently sets the user sync server provider in the product.json.
So we would need to alter that somehow. Our local app (yet to be built :-)) could possibly do that.

There is a hidden config, but i am not sure that GitHub tokens acuired by MS github authentication extension will work for authentication with us. It cannot work we actually allow access only with Gitpod token and "function:accessCodeSyncStorage" scope.

For the recode though, you will need to add following in your user settings and restart VS Code:

"configurationSync.store": {
        "url": "https://gitpod-staging.com/code-sync",
        "stableUrl": "https://gitpod-staging.com/code-sync",
        "insidersUrl": "https://gitpod-staging.com/code-sync",
        "canSwitch": true,
        "authenticationProviders": {
            "gitpod": {
                "scopes": ["function:accessCodeSyncStorage"]
            }
        }
    }
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

We will implement Gitpod auth as a part of the Gitpod extension for VS Code Desktop, and distribute this extension as built-in for VSCode Web Server in order to resolve gitpod-io/openvscode-server#29 as well.

/schedule

@akosyakov: Issue scheduled in the IDE team (WIP: 0)

In response to this:

/schedule

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

I assigned myself for now, but @filiptronicek is working on it.

@mikenikles This one is tricky in the sense of CHANGELOG, the PR is done against another repo. So there is no automation.

I added another task to the description that we don't forget to highlight it.

I’d like to be able to keep the same layout in my VS code when I reopen GitPod and someone directed me to this thread.
Is it currently possible, if I drag closed the file explorer, to save those settings? Or is this feature ongoing? Thanks very much

I’d like to be able to keep the same layout in my VS code when I reopen GitPod and someone directed me to this thread.
Is it currently possible, if I drag closed the file explorer, to save those settings? Or is this feature ongoing? Thanks very much

This issue is about auto synching with VS Code Desktop settings. Settings Sync in VS Code Web already enabled by default. Please consult VS Code settings docs for possible layout customizations.

Unfortunately we have to focus on JetBrains remote dev support in Q4 and don't have enough capacity to bring it in proper state. That's said many issue were already figure out, so we should be able to finish in next year. I will remove it from the groundwork for now.

As I keep my VSC settings.json in my dotfiles, it would be great if I could link to it in the dotfiles install script.

@yajo I'm a little late to the party, but would something like Settings Sync work for you in the interim? I used it before Microsoft acquired VSCode and it worked well. It syncs your settings, keybindings, extensions, and snippets to a Github Gist, which then just gets copied over to the appropriate place in your other instances.

yajo commented

Thanks @rrapstine. I currently use that extension locally because I recently switched to VSCodium. However, it seems forbidden in gitpod:

imagen

However, it seems forbidden in gitpod:

@yajo it seems that the extension authors disabled the extension from running in remote contexts - from the docs:

"extensionKind": ["ui"] — Indicates the extension must run close to the UI because it requires access to local assets, devices, or capabilities or because low latency is required. In the case of VS Code for the Web with Codespaces, where no local extension host is available, such an extension can not load, unless it is also a web extension. It will then be loaded in the web extension host.

It looks like there is an issue for this but hasn't been touched since 2020: shanalikhan/code-settings-sync#1209.

Removed epic label from this issue in favour of: #9136 (added to roadmap)

Seems we forgot to close this one!

This shipped a couple of weeks ago, see the changelog update and the docs! 🚀 🙏

https://www.gitpod.io/changelog/vs-code-desktop-settings-sync
https://www.gitpod.io/docs/ides-and-editors/settings-sync

If you have any feedback, let us know 🚀

I keep my VSC settings files manually in my dotfiles repo. Is there a way to use my VSC settings files in Gitpod instead of the automatic settings sync?

Not possible as settings in vscode browser are stored in the browser localstorage so only way to sync them is using settings sync

Not possible as settings in vscode browser are stored in the browser localstorage so only way to sync them is using settings sync

Wouldn't it be possible for Gitpod to support some kind of "import settings from JSON" workflow? (e.g. via the gp CLI?)

Can I use both VSC sync (via Microsoft) and VSC sync (via Gitpod) at the same time?

Wouldn't it be possible for Gitpod to support some kind of "import settings from JSON" workflow? (e.g. via the gp CLI?)

Maybe a command in the gitpod extension that reads a file and uses the vscode API to update settings could work, but what about merge conflicts, etc. I suggest you to create a separate issue as a feature request.

Can I use both VSC sync (via Microsoft) and VSC sync (via Gitpod) at the same time?

Nope, why would you want to use both? Are you using codespaces or vscode.dev too? (we plan to investigate if our settings sync also works there)

Nope, why would you want to use both? Are you using codespaces or vscode.dev too? (we plan to investigate if our settings sync also works there)

Yes, I'm using github.dev a lot as well. I don't want to have to choose for one or the other.

I suggest you to create a separate issue as a feature request.

Done: #10702