Skip to content

Instantly share code, notes, and snippets.

@pbosetti
Last active December 2, 2020 16:20
Show Gist options
  • Save pbosetti/aeae8232d20c2789c6b3d2d91a07981d to your computer and use it in GitHub Desktop.
Save pbosetti/aeae8232d20c2789c6b3d2d91a07981d to your computer and use it in GitHub Desktop.
VisualStudio Code setup script
#!/usr/bin/env sh
# Call this script remotely:
# $ sh <(wget -qO- "https://git.io/JJPaQ")
OS=$(uname)
CODE="VisualStudio Code"
echo "Setting up Visual Studio Code on $OS"
if [ "$OS" = "Darwin" ]; then
echo "Assumimg $CODE is already installed!"
SETTINGS_DIR="$HOME/Library/Application\ Support/Code/User"
elif [ "$OS" = Linux ]; then
echo "> Installing or updating $CODE"
sudo snap install code --classic
echo "> Installing apt packages"
sudo apt update
sudo apt install -y build-essential cmake clang lldb \
git \
clang-format figlet \
lua5.3 liblua5.3-dev \
gnuplot \
libglu1-mesa-dev freeglut3-dev mesa-common-dev \
libreadline-dev \
ruby \
graphviz
sudo gem install gv_fsm
SETTINGS_DIR="$HOME/.config/Code/User"
else
echo "Unsupported OS, exiting."
exit 1
fi
echo "> Installing $CODE extensions"
code --force --install-extension aprilandjan.ascii-tree-generator
code --force --install-extension canna.figlet
code --force --install-extension EFanZh.graphviz-preview
code --force --install-extension eriklynd.json-tools
code --force --install-extension kenhowardpdx.vscode-gist
code --force --install-extension mammothb.gnuplot
code --force --install-extension matthewthorning.align-vertically
code --force --install-extension mitaki28.vscode-clang
code --force --install-extension ms-azuretools.vscode-docker
code --force --install-extension ms-vscode-remote.remote-containers
code --force --install-extension ms-vscode-remote.remote-ssh
code --force --install-extension ms-vscode-remote.remote-ssh-edit
code --force --install-extension ms-vscode-remote.remote-wsl
code --force --install-extension ms-vscode-remote.vscode-remote-extensionpack
code --force --install-extension ms-vscode.cmake-tools
code --force --install-extension ms-vscode.cpptools
code --force --install-extension ms-vsliveshare.vsliveshare
code --force --install-extension rebornix.ruby
code --force --install-extension redhat.vscode-yaml
code --force --install-extension stkb.rewrap
code --force --install-extension sumneko.lua
code --force --install-extension twxs.cmake
code --force --install-extension vadimcn.vscode-lldb
code --force --install-extension wingrunr21.vscode-ruby
code --force --install-extension wmaurer.change-case
code --force --install-extension wwm.better-align
code --force --install-extension xaver.clang-format
code --force --install-extension yo1dog.cursor-align
echo "> Setting up keybindings in $SETTINGS_DIR"
cat > $SETTINGS_DIR/keybindings.json <<-EOB
[
{
"key": "alt+t",
"command": "workbench.action.terminal.toggleTerminal"
}
]
EOB
cat > $SETTINGS_DIR/settings.json <<-EOB
{
"editor.tabSize": 2,
"window.menuBarVisibility": "toggle",
"window.restoreFullscreen": true
}
EOB
echo "> Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment