question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sharing my approach to use VSCode Settings Sync and official extension market

See original GitHub issue

First, thanks for this great project, this is much easier to use than Che and Theia

Two problems I’ve come across during my day of use are

  • Extensions are cached and installed from Coder’s server, most of which for now are outdated
  • Cannot Sync settings with VSCode

My approach

So I made a Docker template to automatically configure code-server from Settings Sync Gist.

Using Docker’s multi-stage build, I can directly use the actual Visual Studio Code binary to install extensions from Microsoft’s server, and then later copy them to code-server. And VSCode settings are also directly fed into code-server.

extensions.json parsing and installing

Is done the UNIX way.

jq -r ".[].metadata.publisherId" extensions.json > extensions.list
while IFS='' read -r line || [[ -n "$line" ]]; do
    echo "Installing $line using VSCode";
    code --user-data-dir /root/.config/Code --install-extension $line
done < "$1" # extensions.list

For those of you who already use Settings Sync, my configuration might be handy as you only need to change the gist id to make the entire thing work.

Relevant Issues: #30 #145 My template: https://github.com/LER0ever/EvDev

Screenshot, almost the same as my VSCode: image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:15
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ezhcommented, Mar 10, 2019

@LER0ever Thank you very much for information.

I updated your solution a bit. Now, everything that I need is only update extensions file and do docker build ... https://github.com/ezh/code-server/blob/ide/Dockerfile https://github.com/ezh/code-server/blob/ide/extensions

I get extension id directly from URL of VSCode market. For example https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby rebornix.Ruby is extension id.

1reaction
davefinstercommented, Mar 29, 2019

I took a somewhat heavier handed approach. I build a docker image containing the real VSCode as per https://github.com/davefinster/coder/blob/master/official-vscode/Dockerfile and then build the real Coder container with https://github.com/davefinster/coder/blob/master/go/Dockerfile.

In my case I’m just installing the Go extensions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings Sync in Visual Studio Code
Settings Sync lets you share your Visual Studio Code configurations such as settings, keybindings, and installed extensions across your machines so you are ......
Read more >
Sharing my approach to use VSCode Settings Sync ... - GitHub
So I made a Docker template to automatically configure code-server from Settings Sync Gist. Using Docker's multi-stage build, I can directly use ......
Read more >
How to Sync VS Code Settings Between Multiple Devices and ...
Step 0: VS Code · Step 1: Install Settings Sync · Step 2: Authorize access to Github · Step 3: Upload your current...
Read more >
How to Sync Your VS Code Settings and Extensions Across ...
A walkthrough on using Visual Studio Code's Settings Sync feature to sync your IDE settings, extensions, shortcuts across your multiple devices.
Read more >
Take Your VS Code Configuration Anywhere Easily with ...
This plugin, free in the VS Code marketplace is exactly what its Github description says it is: a tool that can sync your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found