Issue: When using custom (non Domino provided) VSCode image my settings are not saved after workspace restart.
Root cause: When using Domino provided image for VSCode the user configuration files will already be specified in the image and their location would be under /mnt which is one of the few locations that is synced to DFS . However if you are using a custom image your VSCode configuration files location might be different. For example /home/<user>/.vscode/settings.json or any other location under /opt or /var. None of those locations will be synced to DFS which creates the problem of any changed settings not being saved.
Solution: To resolve this you can inject your settings in the workspace at start time instead. To do this you will first have to find the location of the config files. Press ctrl+shift+P and in the text box type "Open Settings (JSON)"
That will present you with editor and the settings.json file which will have the path noted as well:
In this example we are using /mnt/.vscode/User/settings.json . However in custom images you might have various locations under /opt /var or /home .
Once identified the path for the settings.json, go to your environment and add the following to your pre-run script section:
mkdir -p /home/ubuntu/.local/share/code-server/User/
cat <<EOT >> /home/ubuntu/.local/share/code-server/User/settings.json
{
"files.autoSave": "off"
}
EOT
This example is using location under /home and is introducing a setting to disable the autosave feature for VSCode. Any settings you would like to make permanent can be added in between the {.....} .
Comments
0 comments
Please sign in to leave a comment.