Sure! I’m at work right now but I’ll post something tonight.
{
"folders": [
{
"path": "<project folder>"
}
],
"settings": {
"terminal.integrated.shellArgs.linux": ["-c", "flatpak-spawn --host toolbox enter -c <container name>"]
}
}
So this is what my .code-workspace file looks like for one of my projects. This was generated automatically by VS Code. If you don’t want to use workspaces there’s also folder settings you can set in VS Code’s integrated settings editor. You can get to the settings editor with the gear in the bottom left corner. From there you switch to Workspace Settings and you’ll find the option under Features → Terminal → Integrated > Shell Args: Linux. The cool thing is that since these .code-workspace files are just json these could be created automatically with a script. I plan on writing a script that will automatically generate a container and a code-workspace automatically, and maybe also enter the container and install certain packages according to arguments given.