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.
cmd: code --list-extensions, example output :
foo.bar
foo1.bar2
Visual Studio Code: Open settings file, add option:
"remote.SSH.defaultExtensions": [
"foo.bar",
]
On the SSH target :
rm ~/.vscode-server
Reconnect VSCode Remote Server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With