Bootstrap a macOS work environment from scratch
- zsh
- tmux
- vim
- git
- alacritty
Install homebrew (Refer to https://brew.sh/)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Restore brew packages
brew bundle
cat ports.txt | xargs sudo port -N install
Download Menlo for Powerline.ttf and double-click to install.
Refer to https://ohmyz.sh/ for details
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
./install.sh
Install tpm https://github.com/tmux-plugins/tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Start tmux and install tmux plugins with prefix + I
Install vimplug https://github.com/junegunn/vim-plug
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
Use brew-installed python3 (instruction depending on python3 version used), e.g.
ln -s /opt/local/bin/python3 /usr/local/bin/python3
ln -s /opt/local/bin/pip-3.14 /usr/local/bin/pip3
Install neovim providers https://neovim.io/doc/user/provider.html
pip3 install --user --upgrade pynvim
npm install -g neovim
Start nvim, install neovim plugins with :PlugInstall
Install go
brew install go
Install gopls
go install golang.org/x/tools/gopls@latest
Install nvim coc plugins
:CocInstall coc-go
Install rust ([link]https://doc.rust-lang.org/book/ch01-01-installation.html)
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
xcode-select --install
Install rust-analyzer ([link]https://rust-analyzer.github.io/book/rust_analyzer_binary.html)
curl -L https://github.com/rust-lang/rust-analyzer/releases/latest/download/rust-analyzer-aarch64-apple-darwin.gz | gunzip -c - > ~/.local/bin/rust-analyzer
chmod +x .local/bin/rust-analyzer
Install nvim coc plugins
:CocInstall coc-rust-analyzer
Install pre-commit framework
pip3 install pre-commit
Install ggshield
brew install ggshield
Sign-in
ggshield auth login