Save workspace settings

Currently when I define a workspace (theme preference, files loaded, widget/window positions) it is saved in the browsers local file storage. I would like to save these settings and automatically load the workspace settings when opening the workspace path in the browser. However, currently “Save workspace as” is disabled in the file menu. Is there a way to enable this menu item or to force a save in another manner?

[original thread by EK]

[EK]

I managed to find the setting to enable multi-root workspaces but it just saves a file without values:

{
   "folders": [
      {
         "path": ""
      }
   ],
   "settings": {}
}

@ektek It works like designed to be compatible with VS Code. If you want to store window state as a part of a workspace settings, you will need to create a custom extension with custom WorkspaceStorage which persist/retrive such information in the file not in the local storae.

[EK]

Thank you very much @anton-kosyakov. Do you know of any examples where this is done already. If not I’ll give it a shot from scratch.

[EK]

Just closing the loop here if someone is looking for the same thing: https://github.com/theia-ide/theia/issues/4263#issuecomment-529342132

@ektek I am not aware of any open source code. Gitpod workspace snapshots are capable to capture and restore such information, so it was done, but this code is not opened.