Reputation:
How do I install VSCode extensions in an SSH connection without doing it through the VSCode UI? I have an environment that spins up a new VM for git branches, and it's really annoying to have to go manually install every extension for each new VM.
I've tried adding them to a devcontainer.json file, which is ignored (it only works on containers, not ssh, even in the newest release that's had some support for the file via ssh connections).
I could add a bunch of packages to vscode's settings, but I want to avoid that because what I install is different based on whether I'm looking at a rust service, node, etc and it's pretty pointless to install every conceivable package in every vm.
Upvotes: 7
Views: 6788
Reputation: 1861
#get extendsions ids
code --list-extensions
//foo.bar
//foo1.bar2
"remote.SSH.defaultExtensions": [
"foo.bar",
]
ssh remote ssh rm ~/.vscode-server
Upvotes: 10