cmd / laptop
I maintain a laptop repo that configures a macOS machine as a software development environment.
Install
Clone onto laptop:
export LAPTOP="$HOME/laptop"
git clone https://github.com/croaky/laptop.git $LAPTOP
cd $LAPTOP
Review:
less laptop.sh
Run:
./laptop.sh
What it sets up
The script is idempotent. I run it most workday mornings. I test it on the latest macOS on Apple Silicon. It:
- installs system packages with Homebrew
- sets the shell to zsh
- configures terminals Ghostty and Warp
- symlinks dotfiles from the repo to
$HOME - installs Go and Rust
- installs Go tools: deadcode, godoc, goimports, gopls
- installs language servers for Bash, Go, HTML, Lua, TypeScript
- installs the
tsgotypechecker and thedprintformatter as pinned single binaries - sets up Neovim with LSP, completion, fuzzy-finding
- starts Postgres dev and test clusters
No JavaScript runtime
The machine has no node, npm, or bun. The tools that read TypeScript
are native binaries: tsgo typechecks, dprint formats, and a Go
program drives esbuild through its Go API.
See CDN.
The standard language servers publish only as npm packages, so I replaced them:
- Bash: bashd, a Go server built on
mvdan.cc/shthat calls theshellcheckbinary for diagnostics, in place ofbash-language-server. - HTML: superhtml, one Zig
binary that is both a language server and a formatter, in place of
vscode-langservers-extracted. - TypeScript:
tsgo --lsp --stdio, the same binary that typechecks, in place oftsserver.
The nvim-treesitter install step runs tree-sitter generate, which
reads a grammar.js. --js-runtime native reads it with the QuickJS
engine in the CLI. See vim / tree-sitter grammar.