update vscode install script generation

This commit is contained in:
Daylin Morgan 2021-12-08 16:14:44 -06:00
parent f70efb52a6
commit cae0ccbf0a
3 changed files with 52 additions and 66 deletions

View file

@ -0,0 +1,49 @@
#!/usr/bin/env bash
YAMLDOC="extensions.yml"
# check for yq
if ! command -v yq &> /dev/null
then
echo "yq could not be found"
echo "to install w/ eget"
echo "eget mikefarah/yq"
exit
fi
readarray sections < <(yq e 'keys | .[]' $YAMLDOC)
get_extensions() {
for section in "${sections[@]}"
do
echo $section
readarray exts < <(key=$section yq e '.[env(key)] | .[]' $YAMLDOC)
echo ${exts[@]}
for ext in "${exts[@]}"
do
write_bat $ext
write_sh $ext
done
done
}
write_bat() {
echo "call code --install-extension $1 --force" >> install-extensions.bat
}
write_sh() {
echo "code --install-extension $1 --force" >> install-extensions.sh
}
# clean up old files
rm -f install-extensions.{sh,bat}
echo "echo off" > install-extensions.bat
echo >> install-extensions.bat
echo "echo Installing VSCode extensions" >> install-extensions.bat
echo "#!/usr/bin/env bash" > install-extensions.sh
echo >> install-extensions.sh
echo "echo Installing VSCode extensions" >> install-extensions.sh
# read extensions and write install scripts
get_extensions

34
vscode/install-extensions.bat Executable file → Normal file
View file

@ -1,64 +1,32 @@
echo off echo off
:: VS Code Extensions install script echo Installing VSCode extensions
::
:: Author: Daylin Morgan
::
:: DO NOT EDIT MANUALLY!
:: Regenerate with generate_install_scripts.py
echo "Installing VS Code Extensions"
echo.
:: general extensions
:: ------------------
call code --install-extension ms-vscode-remote.remote-ssh --force call code --install-extension ms-vscode-remote.remote-ssh --force
call code --install-extension ms-vscode-remote.remote-ssh-edit --force call code --install-extension ms-vscode-remote.remote-ssh-edit --force
call code --install-extension ms-vscode-remote.remote-wsl --force call code --install-extension ms-vscode-remote.remote-wsl --force
call code --install-extension vscodevim.vim --force call code --install-extension vscodevim.vim --force
:: misc-tools extensions
:: ---------------------
call code --install-extension Shan.code-settings-sync --force call code --install-extension Shan.code-settings-sync --force
call code --install-extension janisdd.vscode-edit-csv --force call code --install-extension janisdd.vscode-edit-csv --force
call code --install-extension cssho.vscode-svgviewer --force call code --install-extension cssho.vscode-svgviewer --force
call code --install-extension naumovs.color-highlight --force call code --install-extension naumovs.color-highlight --force
:: web-dev extensions
:: ------------------
call code --install-extension bradlc.vscode-tailwindcss --force call code --install-extension bradlc.vscode-tailwindcss --force
call code --install-extension ritwickdey.liveserver --force call code --install-extension ritwickdey.liveserver --force
:: styling extensions
:: ------------------
call code --install-extension johnpapa.vscode-peacock --force call code --install-extension johnpapa.vscode-peacock --force
call code --install-extension PKief.material-icon-theme --force call code --install-extension PKief.material-icon-theme --force
call code --install-extension Thomaz.preparing --force call code --install-extension Thomaz.preparing --force
call code --install-extension whizkydee.material-palenight-theme --force call code --install-extension whizkydee.material-palenight-theme --force
:: code-help extensions
:: --------------------
call code --install-extension aaron-bond.better-comments --force call code --install-extension aaron-bond.better-comments --force
call code --install-extension CoenraadS.bracket-pair-colorizer-2 --force call code --install-extension CoenraadS.bracket-pair-colorizer-2 --force
call code --install-extension streetsidesoftware.code-spell-checker --force call code --install-extension streetsidesoftware.code-spell-checker --force
call code --install-extension vsls-contrib.gistfs --force call code --install-extension vsls-contrib.gistfs --force
call code --install-extension mhutchie.git-graph --force call code --install-extension mhutchie.git-graph --force
call code --install-extension Github.copilot --force call code --install-extension Github.copilot --force
:: python extensions
:: -----------------
call code --install-extension ms-python.python --force call code --install-extension ms-python.python --force
call code --install-extension ms-toolsai.jupyter --force call code --install-extension ms-toolsai.jupyter --force
call code --install-extension njpwerner.autodocstring --force call code --install-extension njpwerner.autodocstring --force
call code --install-extension snakemake.snakemake-lang --force call code --install-extension snakemake.snakemake-lang --force
:: language-support extensions
:: ---------------------------
call code --install-extension lextudio.restructuredtext --force call code --install-extension lextudio.restructuredtext --force
call code --install-extension Ikuyadeu.r --force call code --install-extension Ikuyadeu.r --force
call code --install-extension James-Yu.latex-workshop --force call code --install-extension James-Yu.latex-workshop --force
call code --install-extension budparr.language-hugo-vscode --force call code --install-extension budparr.language-hugo-vscode --force
call code --install-extension tht13.rst-vscode --force call code --install-extension tht13.rst-vscode --force
echo "Extension installation compeleted!"

35
vscode/install-extensions.sh Executable file → Normal file
View file

@ -1,63 +1,32 @@
#!/bin/bash #!/usr/bin/env bash
# VS Code Extensions install script echo Installing VSCode extensions
#
# Author: Daylin Morgan
#
# DO NOT EDIT MANUALLY!
# Regenerate with generate_install_scripts.py
echo "Installing VS Code Extensions"
# general extensions
# ------------------
code --install-extension ms-vscode-remote.remote-ssh --force code --install-extension ms-vscode-remote.remote-ssh --force
code --install-extension ms-vscode-remote.remote-ssh-edit --force code --install-extension ms-vscode-remote.remote-ssh-edit --force
code --install-extension ms-vscode-remote.remote-wsl --force code --install-extension ms-vscode-remote.remote-wsl --force
code --install-extension vscodevim.vim --force code --install-extension vscodevim.vim --force
# misc-tools extensions
# ---------------------
code --install-extension Shan.code-settings-sync --force code --install-extension Shan.code-settings-sync --force
code --install-extension janisdd.vscode-edit-csv --force code --install-extension janisdd.vscode-edit-csv --force
code --install-extension cssho.vscode-svgviewer --force code --install-extension cssho.vscode-svgviewer --force
code --install-extension naumovs.color-highlight --force code --install-extension naumovs.color-highlight --force
# web-dev extensions
# ------------------
code --install-extension bradlc.vscode-tailwindcss --force code --install-extension bradlc.vscode-tailwindcss --force
code --install-extension ritwickdey.liveserver --force code --install-extension ritwickdey.liveserver --force
# styling extensions
# ------------------
code --install-extension johnpapa.vscode-peacock --force code --install-extension johnpapa.vscode-peacock --force
code --install-extension PKief.material-icon-theme --force code --install-extension PKief.material-icon-theme --force
code --install-extension Thomaz.preparing --force code --install-extension Thomaz.preparing --force
code --install-extension whizkydee.material-palenight-theme --force code --install-extension whizkydee.material-palenight-theme --force
# code-help extensions
# --------------------
code --install-extension aaron-bond.better-comments --force code --install-extension aaron-bond.better-comments --force
code --install-extension CoenraadS.bracket-pair-colorizer-2 --force code --install-extension CoenraadS.bracket-pair-colorizer-2 --force
code --install-extension streetsidesoftware.code-spell-checker --force code --install-extension streetsidesoftware.code-spell-checker --force
code --install-extension vsls-contrib.gistfs --force code --install-extension vsls-contrib.gistfs --force
code --install-extension mhutchie.git-graph --force code --install-extension mhutchie.git-graph --force
code --install-extension Github.copilot --force code --install-extension Github.copilot --force
# python extensions
# -----------------
code --install-extension ms-python.python --force code --install-extension ms-python.python --force
code --install-extension ms-toolsai.jupyter --force code --install-extension ms-toolsai.jupyter --force
code --install-extension njpwerner.autodocstring --force code --install-extension njpwerner.autodocstring --force
code --install-extension snakemake.snakemake-lang --force code --install-extension snakemake.snakemake-lang --force
# language-support extensions
# ---------------------------
code --install-extension lextudio.restructuredtext --force code --install-extension lextudio.restructuredtext --force
code --install-extension Ikuyadeu.r --force code --install-extension Ikuyadeu.r --force
code --install-extension James-Yu.latex-workshop --force code --install-extension James-Yu.latex-workshop --force
code --install-extension budparr.language-hugo-vscode --force code --install-extension budparr.language-hugo-vscode --force
code --install-extension tht13.rst-vscode --force code --install-extension tht13.rst-vscode --force
echo "Extension installation compeleted!"