Radian: dotfiles that marry elegance and practicality.
Summary
These dotfiles attempt to achieve the following goals:
- aggressively using best practices, or creating them if none exist already
- extensively documenting and commenting all code
- remaining as simple as possible while maximizing usability (in particular, not rebinding keys unnecessarily)
- supporting local configuration without the need to fork this repository (my local Emacs configuration is almost 500 lines)
Software configured, features
- Emacs
- Next-generation package manager,
straight.el - Clean and DRY package customizations using
use-package - Future-proof customizations using
el-patch - Sorting by frecency and usage on all commands using
prescient.el - Informative but minimal mode-line showing file modification status, buffer name, point position, current project, Git branch, and active modes
- Extremely clean mode lighters thanks to Blackout
- Aggressive startup optimization: 0.6s or less for a fully configured graphical frame
- Aggressively consistent coding style and documentation, including heavy use of macros to automate and foolproof common operations
- Delightful color scheme that works in the terminal (Zerodark)
- Clipboard, mouse, and PATH integration for macOS
- Automatic creation and interactive removal of parent directories when finding files
- Extensible system for defining mnemonic key sequences to jump to dotfiles
- Choose to kill, restart, or spawn new Emacs on
C-x C-c, based partly onrestart-emacs - Configured packages: Atomic Chrome, Autorevert, buffer-move, Company, Counsel, delete-selection-mode, Dired, ElDoc, ESUP, Flycheck, Helpful, Ivy, Magit, no-littering, Org, Projectile, Smartparens, Sunrise Commander, Swiper, transpose-frame, undo-tree, use-package, visual-regexp, webpaste.el, and more
- Supported languages: C/C++, Clojure, Haskell, JavaScript, LaTeX, Markdown, Python, Ruby, Rust, TypeScript, and more
- Major modes for editing many configuration file types
- Next-generation package manager,
- Zsh
- Extremely fast and flexible package manager, zplugin
- No-nonsense prompt showing username, hostname, working directory, and Git status, colored by exit code
- Substring completion everywhere
- GUI-like file/directory copy/paste functions on the command line
- Extensive library of clean and consistent Git aliases
- Colored man pages
- Tmux
- Keybindings for inserting new windows and shifting them left and right
- No-nonsense but stylish status bar Ă la powerline but without the dependencies
- Spectacular hack to leverage reattach-to-user-namespace on macOS with minimal side effects
- Git
- Create a repository and a root commit all at once
- Rename stashes
- Reword a commit while preserving the index
- Alias and unalias without messing with
git config - More helpful output from
git status, submodules, and more
- Leiningen
- Modular profile system allowing maximal performance through selecting exactly the features you want
- Inject useful utility functions using Vinyasa
- Pull JARs from Maven and hotload them into your REPL with Alembic
- Refresh a dirty REPL without a restart, using tools.namespace
- Colorization and pretty-printing of output and stack traces in the REPL
Installation
Setup is in three parts: installing the software, installing the configuration, and optionally installing local configuration.
Installing software
macOS
- Emacs:
brew install emacs --with-cocoa, version 26.1 minimum;brew install python; (optional for improved startup time)brew install watchexec - Zsh:
brew install zsh;mkdir ~/.zplugin;git clone git@github.com:zdharma/zplugin.git ~/.zplugin/bin - Tmux:
brew install tmux - Git:
brew install git - Leiningen:
brew cask install java;brew install leiningen
Arch Linux
- Emacs:
pacman -S emacs python; (optional for improved startup time) installwatchexecfrom AUR - Zsh:
pacman -S zsh;mkdir ~/.zplugin;git clone git@github.com:zdharma/zplugin.git ~/.zplugin/bin - Tmux:
pacman -S tmux - Git:
pacman -S git - Leiningen:
pacman -S jdk8-openjdk; installleiningenfrom AUR
Installing configuration
Use symbolic links:
./emacs/init.el => ~/.emacs.d/init.el
./emacs/versions.el => ~/.emacs.d/straight/versions/radian.el
./git/.gitconfig => ~/.gitconfig
./git/.gitexclude => ~/.gitexclude
./leiningen/profiles.clj => ~/.lein/profiles.clj
./shell/bash/.bashrc => ~/.bashrc
./shell/shared/.profile => ~/.profile
./shell/zsh/.zshrc => ~/.zshrc
./tmux/.tmux.conf => ~/.tmux.conf
Installing local configuration
- Emacs:
~/.emacs.d/init.local.el,~/.emacs.d/straight/versions/radian-local.el - All shells:
~/.profile.local - Zsh:
~/.zshrc.local - Tmux:
~/.tmux.local.conf - Git:
~/.gitconfig.local
Tips and tricks
In order to get $PATH, ssh-agent, and gpg-agent working
correctly in graphical applications on macOS, use
scripts/patch-macos-app.zsh. Note however that Emacs already sources
~/.profile (and thereby ~/.profile.local) during startup.
Contributing
Please feel free to contribute in any way that you would like. If you find a bug or have a question about how to use Radian, report it. If you want to contribute code, please do. (Try to follow the style of the surrounding code.)
Reading the source code
Please do! It will probably be informative in one way or another. The goal is that absolutely everything should be either obvious or commented.