#!/bin/bash -ex

# EDITOR_BIN="$(ls /vscode/cursor-server/bin/*/*/bin/remote-cli/cursor | head -n 1)"

# detect if either cursor or code is available, and use the first detected one
EDITOR_BIN=cursor
# EDITOR_BIN=code

function install_extension() {
  $EDITOR_BIN --install-extension "$1"
}

install_extension Shopify.ruby-extensions-pack
install_extension dbaeumer.vscode-eslint
install_extension aliariff.vscode-erb-beautify
install_extension bradlc.vscode-tailwindcss
install_extension KoichiSasada.vscode-rdbg
install_extension qwtel.sqlite-viewer
install_extension esbenp.prettier-vscode
install_extension ms-azuretools.vscode-docker
install_extension 1YiB.rust-bundle
install_extension rust-lang.rust-analyzer
