Skip to content

Latest commit

 

History

History
163 lines (116 loc) · 4.55 KB

File metadata and controls

163 lines (116 loc) · 4.55 KB

~/.config

My personal dot files.

What this sets up

My day-to-day development environment on macOS:

  • Shell -- zsh with oh-my-zsh, fish-style abbreviations (zsh-abbr), autosuggestions, and syntax highlighting (zshrc, zsh-abbr/)
  • Terminal & workspaces -- cmux with its bundled Ghostty engine: per-project workspaces, panes, and the start smile launcher (cmux/, ghostty/)
  • Editor -- Neovim, mostly for small edits and commit messages (nvim/)
  • macOS hotkeys -- Hammerspoon for app launching and window management (hammerspoon/)
  • Language runtimes -- asdf-managed Ruby, Node.js, and Python

Install

Steps are in the order to run them on a fresh machine.

1. Homebrew

Everything below installs through Homebrew (this also installs the Xcode Command Line Tools, which provide git for the next step).

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Clone

Requires a GitHub SSH key.

git clone git@github.com:lucasprag/.config.git ~/.config

3. zsh + oh-my-zsh

The shell setup uses oh-my-zsh with zsh-abbr (fish-style abbreviations), zsh-autosuggestions, and zsh-syntax-highlighting.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
brew install zsh-autosuggestions zsh-syntax-highlighting
# zsh-abbr as an oh-my-zsh custom plugin (zshrc sources it from this path)
git clone --recurse-submodules https://github.com/olets/zsh-abbr ~/.oh-my-zsh/custom/plugins/zsh-abbr
ln -sf ~/.config/zshrc ~/.zshrc
chsh -s /bin/zsh

Notes:

  • abbreviations are auto-loaded from ~/.config/zsh-abbr/user-abbreviations
  • secrets (DD/Metabase/Slack tokens etc.) live in ~/.secret.zsh -- NOT committed

4. Terminal: cmux

cmux bundles the Ghostty terminal engine, so there is no separate Ghostty install. Both configs are read directly from ~/.config/cmux and ~/.config/ghostty (the ghostty config drives cmux's embedded terminal) -- no symlinks needed.

brew install --cask cmux

5. Languages: asdf

asdf manages the language runtimes I code in: Ruby, Node.js, and Python. zshrc already puts the asdf shims on the PATH.

brew install asdf

Then install only the languages the machine needs.

Ruby

asdf plugin add ruby
asdf install ruby latest
asdf global ruby latest

Node.js

asdf plugin add nodejs
asdf install nodejs latest
asdf global nodejs latest

# pnpm
npm install -g pnpm
asdf reshim nodejs

Python

Latest 3 and latest 2, both available globally (python is 3, python2 resolves via the fallback version).

asdf plugin add python

# latest regular 3.x (skips the free-threaded `t` builds, which `latest` resolves to)
PY3="$(asdf list all python | grep -E '^3(\.[0-9]+)+$' | tail -1)"
asdf install python "$PY3"
asdf install python latest:2
asdf global python "$PY3" latest:2

6. Neovim

brew install neovim

Plugins are managed by lazy.nvim, which installs itself on first launch. Then follow the instructions in nvim/README.md.

7. Hammerspoon

Hammerspoon provides the app-launcher and window-management hotkeys.

ln -s ~/.config/hammerspoon/init.lua ~/.hammerspoon/init.lua

8. macOS tweaks

# make typing great again -- re-pairing the bluetooth keyboard is required to make it work
defaults write -g InitialKeyRepeat -int 13
defaults write -g KeyRepeat -int 1

# after installing vscode. Restart vscode.
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false

Other dependencies

MacOS apps

Day-to-day

Once everything is set up, start smile (defined in zshrc) opens all the smile workspaces via the cmux CLI.