2.4 KiB
2.4 KiB
Dev Environment Setup
Template for Part 1 of the setup script. All steps are idempotent.
Homebrew PATH
if ! grep -q 'brew shellenv' ~/.zprofile 2>/dev/null; then
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
fi
eval "$(/opt/homebrew/bin/brew shellenv)"
Packages
Install via brew (skip if present):
for pkg in neovim tmux git starship gh node; do
if brew list "$pkg" &>/dev/null; then
echo " $pkg: installed"
else
brew install "$pkg"
fi
done
Bun via official installer (not in Homebrew):
if [ -x ~/.bun/bin/bun ]; then
echo " bun: installed"
else
curl -fsSL https://bun.sh/install | bash
fi
Nvim Config
Clone Nicholai's config from Gitea:
if [ -d ~/.config/nvim/.git ]; then
echo "already cloned"
else
mkdir -p ~/.config
git clone https://git.nicholai.work/Nicholai/nvim.git ~/.config/nvim
fi
config.json
Generate if not present. Adapt paths per machine (Mac uses
~/Documents/, ~/Developer/, etc.). Template:
{
"paths": {
"obsidianVault": "~/Documents/obsidian-vault/",
"srcDirectory": "~/Developer/",
"scriptsDirectory": "~/scripts/",
"wallpaperScript": "~/scripts/pywal/wallpapermenu.sh"
},
"editor": {
"tabSize": 4,
"scrollOffset": 8,
"theme": "wave"
},
"ai": {
"model": "claude-sonnet-4-5",
"openCodeModel": "anthropic/claude-sonnet-4-5"
},
"lsp": {
"servers": ["ts_ls", "eslint", "jsonls", "html", "cssls", "tailwindcss"]
},
"treesitter": {
"languages": ["lua", "vim", "bash", "javascript", "typescript", "tsx", "json", "yaml", "html", "css"]
}
}
Dotfile Symlinks
ln -sf ~/.config/nvim/dotfiles/.tmux.conf ~/.tmux.conf
ln -sf ~/.config/nvim/dotfiles/starship.toml ~/.config/starship.toml
Nvim Plugins
nvim --headless "+Lazy! sync" +qa 2>/dev/null || true
Shell Aliases
Append to ~/.zshrc if not already present (check for marker
comment # Added by nvim dotfiles setup). Include:
- Git shortcuts: gs, ga, gc, gp, gl
- Claude aliases: cldy, cldyh, cldys, cldyo
- Directory aliases: .., ..., ...., home, cd.., chpwd, mkdirg
- Editor: EDITOR=nvim, VISUAL=nvim, alias vim=nvim
- Prompt:
eval "$(starship init zsh)"
tmux Terminal Fix
Ensure tmux.conf has this line for backspace over SSH:
set -ga terminal-overrides ",*:Tc,*:kbs=\177"