From 0cd37a6183cab2065e48f6acbd29d5e193277764 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 24 Jan 2023 22:50:28 +0000 Subject: [PATCH] Update 8 files - /home/dot_var/app/com.visualstudio.code/config/symlink_Code - /home/dot_var/app/com.visualstudio.code/config/private_Code/symlink_User - /home/.chezmoiremove - /home/private_dot_config/private_Code/User/extensions.json - /home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.tmpl - /home/Library/Application Support/VSCodium/symlink_User - /home/Library/Application Support/Code/symlink_User - /software.yml --- home/.chezmoiremove | 1 + ...n_onchange_after_26-vscode-extensions.tmpl | 39 +++++++++++ .../Application Support/Code/symlink_User | 3 + .../Application Support/VSCodium/symlink_User | 3 + .../symlink_User} | 2 +- .../private_Code/User/extensions.json | 30 ++++++++- software.yml | 66 ------------------- 7 files changed, 74 insertions(+), 70 deletions(-) create mode 100644 home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.tmpl create mode 100644 home/Library/Application Support/Code/symlink_User create mode 100644 home/Library/Application Support/VSCodium/symlink_User rename home/dot_var/app/com.visualstudio.code/config/{symlink_Code => private_Code/symlink_User} (56%) diff --git a/home/.chezmoiremove b/home/.chezmoiremove index 0349494c..74625ca3 100644 --- a/home/.chezmoiremove +++ b/home/.chezmoiremove @@ -35,6 +35,7 @@ Brewfile .tmux.conf.local .v8flags* .vagrant.d/ +.var/app/com.visualstudio.code/config/Code/User .viminfo .volta/ .vscode-oss/ diff --git a/home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.tmpl new file mode 100644 index 00000000..013cb441 --- /dev/null +++ b/home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.tmpl @@ -0,0 +1,39 @@ +{{- if (eq .host.distro.family "linux") -}} +#!/usr/bin/env bash + +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + +### Install Visual Studio Code extensions +if command -v code > /dev/null; then + EXTENSIONS="$(code --list-extensions)" + jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do + if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then + logg info 'Installing Visual Studio Code extension `'"$EXTENSION"'`' + code --install-extension "$EXTENSION" + logg success 'Installed `'"$EXTENSION"'`' + else + logg info '`'"$EXTENSION"'` already installed' + fi + done +else + logg warn '`code` executable not available' +fi + +### Install VSCodium extensions +if command -v codium > /dev/null; then + EXTENSIONS="$(codium --list-extensions)" + jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do + if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then + logg info 'Installing VSCodium extension `'"$EXTENSION"'`' + codium --install-extension "$EXTENSION" + logg success 'Installed `'"$EXTENSION"'`' + else + logg info '`'"$EXTENSION"'` already installed' + fi + done +else + logg warn '`codium` executable not available' +fi + +{{ end -}} diff --git a/home/Library/Application Support/Code/symlink_User b/home/Library/Application Support/Code/symlink_User new file mode 100644 index 00000000..2c20d531 --- /dev/null +++ b/home/Library/Application Support/Code/symlink_User @@ -0,0 +1,3 @@ +{{- if eq .host.distro.family "darwin" -}} +{{ .chezmoi.homeDir }}/.config/Code/User +{{- end -}} diff --git a/home/Library/Application Support/VSCodium/symlink_User b/home/Library/Application Support/VSCodium/symlink_User new file mode 100644 index 00000000..2c20d531 --- /dev/null +++ b/home/Library/Application Support/VSCodium/symlink_User @@ -0,0 +1,3 @@ +{{- if eq .host.distro.family "darwin" -}} +{{ .chezmoi.homeDir }}/.config/Code/User +{{- end -}} diff --git a/home/dot_var/app/com.visualstudio.code/config/symlink_Code b/home/dot_var/app/com.visualstudio.code/config/private_Code/symlink_User similarity index 56% rename from home/dot_var/app/com.visualstudio.code/config/symlink_Code rename to home/dot_var/app/com.visualstudio.code/config/private_Code/symlink_User index 97c0e9ba..190e3364 100644 --- a/home/dot_var/app/com.visualstudio.code/config/symlink_Code +++ b/home/dot_var/app/com.visualstudio.code/config/private_Code/symlink_User @@ -1,3 +1,3 @@ {{- if eq .host.distro.family "linux" -}} -{{ .chezmoi.homeDir }}/.config/Code +{{ .chezmoi.homeDir }}/.config/Code/User {{- end -}} diff --git a/home/private_dot_config/private_Code/User/extensions.json b/home/private_dot_config/private_Code/User/extensions.json index 578d0f17..e5462ee3 100644 --- a/home/private_dot_config/private_Code/User/extensions.json +++ b/home/private_dot_config/private_Code/User/extensions.json @@ -1,15 +1,25 @@ { "recommendations": [ + "Angular.ng-template", + "attilabuti.vscode-mjml", + "bierner.markdown-emoji", + "ChakrounAnas.turbo-console-log", + "ChFlick.firecode", "chrmarti.regex", + "cweijan.vscode-mysql-client2", "DavidAnson.vscode-markdownlint", "dbaeumer.vscode-eslint", + "denoland.vscode-deno", "eamodio.gitlens", "EditorConfig.EditorConfig", - "esbenp.prettier-vscode", "ericadamski.carbon-now-sh", + "esbenp.prettier-vscode", + "firsttris.vscode-jest-runner", + "formulahendry.auto-rename-tag", "formulahendry.code-runner", "GitHub.vscode-pull-request-github", "GitLab.gitlab-workflow", + "golang.Go", "GoogleCloudTools.cloudcode", "HashiCorp.terraform", "hediet.vscode-drawio", @@ -18,26 +28,40 @@ "mads-hartmann.bash-ide-vscode", "ms-azuretools.vscode-docker", "ms-kubernetes-tools.vscode-kubernetes-tools", + "ms-python.python", "ms-vscode-remote.remote-containers", "ms-vscode-remote.remote-ssh", "ms-vscode-remote.remote-wsl", "ms-vscode.PowerShell", - "MS-vsliveshare.vsliveshare", "MS-vsliveshare.vsliveshare-audio", + "MS-vsliveshare.vsliveshare", + "njpwerner.autodocstring", + "nrwl.angular-console", "philnash.ngrok-for-vscode", "PKief.material-icon-theme", + "pranaygp.vscode-css-peek", + "quicktype.quicktype", + "rbbit.typescript-hero", "redhat.ansible", "redhat.vscode-yaml", "richie5um2.vscode-sort-json", "Rubymaniac.vscode-paste-and-indent", + "salbert.comment-ts", "shd101wyy.markdown-preview-enhanced", "softwaredotcom.swdc-vscode", + "steoates.autoimport", + "stylelint.vscode-stylelint", "timonwong.shellcheck", + "toba.vsfire", "tyriar.sort-lines", "usernamehw.errorlens", "valentjn.vscode-ltex", + "VisualStudioExptTeam.vscodeintellicode", + "vsciot-vscode.vscode-arduino", "vsls-contrib.codetour", "vsls-contrib.gistfs", - "wayou.vscode-todo-highlight" + "wayou.vscode-todo-highlight", + "wix.vscode-import-cost", + "yatki.vscode-surround" ] } diff --git a/software.yml b/software.yml index b2fb5629..c1011c0b 100644 --- a/software.yml +++ b/software.yml @@ -8629,69 +8629,3 @@ softwarePlugins: - vagrant-share - vagrant-vbguest - vagrant-vmware-desktop - vscodium: - cmd: bash -c 'if [ ! -n "$(find ~/.vscode/extensions -mindepth 1 -maxdepth 1 -type d -name "$(echo {PLUGIN} | tr "[:upper:]" "[:lower:]")*" -print -quit)" ]; then codium --install-extension "$(echo {PLUGIN} | tr "[:upper:]" "[:lower:]")"; fi' - plugins: - - Angular.ng-template - - attilabuti.vscode-mjml - - bierner.markdown-emoji - - ChakrounAnas.turbo-console-log - - ChFlick.firecode - - chrmarti.regex - - cweijan.vscode-mysql-client2 - - DavidAnson.vscode-markdownlint - - dbaeumer.vscode-eslint - - denoland.vscode-deno - - eamodio.gitlens - - EditorConfig.EditorConfig - - ericadamski.carbon-now-sh - - esbenp.prettier-vscode - - firsttris.vscode-jest-runner - - formulahendry.auto-rename-tag - - formulahendry.code-runner - - GitHub.vscode-pull-request-github - - GitLab.gitlab-workflow - - golang.Go - - GoogleCloudTools.cloudcode - - HashiCorp.terraform - - hediet.vscode-drawio - - IBM.output-colorizer - - Kelvin.vscode-sshfs - - mads-hartmann.bash-ide-vscode - - ms-azuretools.vscode-docker - - ms-kubernetes-tools.vscode-kubernetes-tools - - ms-python.python - - ms-vscode-remote.remote-containers - - ms-vscode-remote.remote-ssh - - ms-vscode-remote.remote-wsl - - ms-vscode.PowerShell - - MS-vsliveshare.vsliveshare - - MS-vsliveshare.vsliveshare-audio - - njpwerner.autodocstring - - nrwl.angular-console - - philnash.ngrok-for-vscode - - PKief.material-icon-theme - - pranaygp.vscode-css-peek - - quicktype.quicktype - - rbbit.typescript-hero - - redhat.ansible - - redhat.vscode-yaml - - richie5um2.vscode-sort-json - - Rubymaniac.vscode-paste-and-indent - - salbert.comment-ts - - shd101wyy.markdown-preview-enhanced - - softwaredotcom.swdc-vscode - - steoates.autoimport - - stylelint.vscode-stylelint - - timonwong.shellcheck - - toba.vsfire - - tyriar.sort-lines - - usernamehw.errorlens - - valentjn.vscode-ltex - - VisualStudioExptTeam.vscodeintellicode - - vsciot-vscode.vscode-arduino - - vsls-contrib.codetour - - vsls-contrib.gistfs - - wayou.vscode-todo-highlight - - wix.vscode-import-cost - - yatki.vscode-surround