Adds initial VSCode user settings, working around code-server bugs

This commit is contained in:
Franck Nijhof 2019-03-26 12:57:57 +01:00
parent 57887829c0
commit 531964776d
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
2 changed files with 21 additions and 1 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: Visual Studio Code
# This files check if all user configuration requirements are met
# Updates/installs build-in extensions and set up initial user configuration.
# ==============================================================================
# Ensure persistent data folder exists
@ -12,3 +12,11 @@ fi
# Copy in the extensions we deliver
cp -R /root/.code-server/extensions/* /data/vscode/extensions
# Sets up default user settings on first start.
if ! bashio::fs.file_exists '/data/vscode/User/settings.json'; then
mkdir -p /data/vscode/User \
|| bashio::exit.nok "Could not create persistent storage folder."
cp -R /root/.code-server/settings.json /data/vscode/User/settings.json
fi

View file

@ -0,0 +1,12 @@
{
"files.watcherExclude": {
"**/__pycache__/**": true,
"**/deps/**": true
},
"search.exclude": {
"**/__pycache__/**": true,
"**/deps/**": true
},
"editor.selectionClipboard": false,
"terminal.integrated.copyOnSelection": true
}