-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault-macos-setup.sh
73 lines (62 loc) · 3.32 KB
/
default-macos-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# 15 OCT 2023 - v0.1.0
# This is Harris Tomy's opinionated zsh and VSCode setup for macOS :) have fun.
echo "Do not run this in home directory please"
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# Install zsh-autocomplete
git clone https://github.com/marlonrichert/zsh-autocomplete.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autocomplete;
# Install zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Other utils
brew install autojump eza bat less
# Compilers, package managers, etc TODO: Add rust/cargo utils here
# sudo apt install npm
# This section can be commented/removed if you are not using my .zshrc
# It requires the .zshrc file to be in the same directory as this install script
wget https://raw.githubusercontent.com/harristomyx/machine-setup/main/.maczshrc
cp --force .maczshrc ~/.zshrc
rm .maczshrc
# Use python rich module to print out MD files with nicer formatting
wget https://raw.githubusercontent.com/harristomyx/machine-setup/main/mdcat.py
mkdir -p ~/scripts
cp --force mdcat.py ~/scripts/mdcat.py
rm mdcat.py
# List of extensions to install
extensions=(
"alexkrechik.cucumberautocomplete" # Cucumber (Gherkin) Autocomplete
"medo64.render-crlf" # Render Line Endings
"DavidAnson.vscode-markdownlint" # Markdownlint
"DotJoshJohnson.xml" # XML
"eamodio.gitlens" # GitLens - Git supercharged
"GitLab.gitlab-workflow" # GitLab Workflow
"Gruntfuggly.todo-tree" # Todo Tree
"rioj7.command-variable" # Command Variable
"adpyke.codesnap" # CodeSnap
"ms-vscode.hexeditor" # HexEditor
"ryu1kn.partial-diff" # Partial Diff
"streetsidesoftware.code-spell-checker" # Code Spell Checker
"trond-snekvik.gnu-mapfiles" # GNU mapfiles (syntax highlighting)
"tamasfe.even-better-toml" # Even Better Toml
"ms-vsliveshare.vsliveshare" # Live Share
"nordic-semiconductor.nrf-devicetree" # Nordic Semiconductor nRF DeviceTree
"nordic-semiconductor.nrf-kconfig" # Nordic Semiconductor nrf Kconfig
"redhat.vscode-yaml" # YAML
"charliermarsh.ruff" # Ruff
"ms-python.python" # Python
"twxs.cmake" # CMake
"llvm-vs-code-extensions.vscode-clangd" # Clangd
"matepek.vscode-catch2-test-adapter" # Catch2 Test runner
"ms-vscode.cpptools" # C/C++ Tools
"marus25.cortex-debug" # Cortex-Debug
)
# Install each extension
total=${#extensions[@]}
installed=0
for extension in "${extensions[@]}"; do
code --install-extension "$extension" >/dev/null 2>&1
installed=$((installed + 1))
printf "Installed: %s (%d/%d)\n" "$extension" "$installed" "$total"
done
# Print completion message
echo "\e[32mInstallation completed.\e[0m"