• Stars
    star
    370
  • Rank 112,015 (Top 3 %)
  • Language
    Emacs Lisp
  • Created almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🍉 Dotfiles that marry elegance and practicality.

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 750 lines of code)

If you are a fan of my Emacs packages (such as straight.el, el-patch, Selectrum (replaced by Vertico), CTRLF, prescient.el, Apheleia, Blackout) then you will find all of them configured here.

Note that there is a main branch which is not updated as frequently. You may be interested in running this branch if you desire more stability.

Software configured, features

  • Emacs (minimum version supported: 27.1)
    • Next-generation package manager, straight.el
    • Clean and DRY package customizations using use-package
    • Simpler and less buggy (than Ivy, Counsel, Helm) file and command selection using Vertico
    • More robust and streamlined single-buffer text search (than Isearch, Swiper) using CTRLF
    • Sorting by frecency and usage on all commands using prescient.el
    • IDE features for expanding library of programming languages with LSP via lsp-mode (Bash, C, C++, CSS, Flow, Go, Haskell, HTML, JavaScript, TypeScript, JSX/TSX, Flow, LaTeX, Python with Poetry and Pipenv virtualenvs autodetected)
    • Automatic asynchronous code reformatting without moving point using Black, Brittany, Gofmt, and Prettier via Apheleia
    • Informative but minimal mode-line showing file modification status, buffer name, point position, and active modes (with optional right-alignment support)
    • Extremely clean mode lighters with prettier names thanks to Blackout
    • All the needless messages have been suppressed; no errors mean no messages
    • Aggressive startup optimization: as fast as 0.33s for a fully configured graphical frame (by aggressive lazy-loading of everything; using el-patch to lazy-load packages that weren't designed to be lazy-loaded; by extensive use of idle timers; by disabling of heavy autoloads; by asynchronous byte-compilation of the init-file in a subprocess on successful init, with the local init-file macroexpanded and embedded directly into Radian during compilation; and by running all customizations before the first graphical frame is initialized)
    • Aggressively consistent coding style and documentation (init-file is 37% comments and docstrings), including heavy use of macros to automate and foolproof common operations
    • Future-proof customizations using el-patch
    • Delightful color scheme that works in the terminal (Zerodark)
    • Clipboard, mouse, and PATH integration for macOS and Linux
    • Automatic creation and interactive removal of parent directories when finding and renaming files
    • Automatically clone Emacs source when needed by find-function
    • 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 on restart-emacs
    • Automatic insertion of whitespace and indentation when pressing newline after inserting a pair of delimiters
    • Global auto-fill configured to activate only in comments, docstrings, and text
    • Configured packages: Atomic Chrome (with Firefox support), Autorevert, buffer-move, Company, delete-selection-mode, Dired, dumb-jump, ElDoc, ESUP, Forge, git-gutter-fringe.el, git-link, Helpful, Macrostep, Magit, no-littering, Org, Projectile, pyvenv, rg.el, Smartparens, transpose-frame, undo-tree, use-package, visual-regexp, which-key, and more
    • Major modes for editing many languages and configuration file types
    • Tested on GitHub Actions with Docker configuration included for all supported Emacs versions
  • Zsh
    • Extremely fast and flexible package manager, zinit
    • 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
    • Configured plugins: wdx, zsh-autosuggestions, zsh-history-substring-search, zsh-completions
  • 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
    • Alias and unalias without messing with git config
    • More helpful output from git status, submodules, and more

Installation

Setup is in three parts: installing the software, installing the configuration, and optionally installing local configuration.

Installing software

macOS

  • Emacs: brew install bash python; brew cask install emacs; (optional for improved startup time) brew install watchexec

  • Zsh:

    $ brew install zsh
    $ echo $(which zsh) | sudo tee -a /etc/shells
    $ chfn -s $(which zsh)
    
  • Tmux: brew install tmux

  • Git: brew install git

Ubuntu/Debian

  • Emacs: apt install emacs python3; (optional for improved startup time) apt install watchexec-cli
  • Zsh: apt install zsh
  • Tmux: apt install tmux
  • Git: apt install git

Arch/Manjaro Linux

I use Yay to install AUR packages. If you prefer something different, substitute to taste.

  • Emacs: pacman -S emacs python; (optional for improved startup time) yay -S watchexec
  • Zsh: pacman -S zsh
  • Tmux: pacman -S tmux
  • Git: pacman -S git

Installing configuration

Use symbolic links:

./emacs/init.el => ~/.emacs.d/init.el
./emacs/early-init.el => ~/.emacs.d/early-init.el
./emacs/versions.el => ~/.emacs.d/straight/versions/radian.el
./git/.gitconfig => ~/.gitconfig
./git/.gitexclude => ~/.gitexclude
./shell/shared/.profile => ~/.profile
./shell/zsh/.zshrc => ~/.zshrc
./shell/zsh/.zprofile => ~/.zprofile
./tmux/.tmux.conf => ~/.tmux.conf

Do not attempt to use the emacs subdirectory of this repository as user-emacs-directory; it won't work.

Installing local configuration

  • Emacs: ~/.emacs.d/init.local.el (local configuration) and ~/.emacs.d/straight/versions/radian-local.el (optional, local lockfile for straight.el; will be created when you run M-x straight-freeze-versions)
  • All shells: ~/.profile.local
  • Zsh: ~/.zshrc.local
  • Tmux: ~/.tmux.local.conf
  • Git: ~/.gitconfig.local

I suggest versioning your local dotfiles in a separate repository, and symlinking them to the appropriate locations. This is what I do.

Here is what your init.local.el should probably look like:

;; code that should be run at the very beginning of init, e.g.

(setq radian-font ...)
(setq radian-font-size ...)

(radian-local-on-hook before-straight

  ;; code that should be run right before straight.el is bootstrapped,
  ;; e.g.

  (setq straight-vc-git-default-protocol ...)
  (setq straight-check-for-modifications ...))

(radian-local-on-hook after-init

  ;; code that should be run at the end of init, e.g.

  (use-package ...))

;; see M-x customize-group RET radian-hooks RET for which hooks you
;; can use with `radian-local-on-hook'

You don't have to worry about byte-compiling your local init-file; Radian actually macroexpands it and embeds it directly into the byte-compiled Radian init-file. Using the macro radian-local-on-hook instead of defining functions and adding them to Radian's hooks manually enables some magic that makes this actually work properly.

Documentation

There is some very incomplete documentation here.

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.

More Repositories

1

straight.el

🍀 Next-generation, purely functional package manager for the Emacs hacker.
Emacs Lisp
2,018
star
2

riju

⚡ Extremely fast online playground for every programming language.
JavaScript
588
star
3

ctrlf

⌨️ Emacs finally learns how to ctrl+F.
Emacs Lisp
276
star
4

el-patch

✨ Future-proof your Emacs Lisp customizations!
Emacs Lisp
224
star
5

apheleia

🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.
Emacs Lisp
212
star
6

riju-replit

⚡ Extremely fast online playground for every programming language.
112
star
7

blackout

💡 The easy way to clean up your Emacs mode lighters.
Emacs Lisp
42
star
8

intuitive-explanations

📚 Understand, don't memorize.
JavaScript
14
star
9

emtas

Emacs Lisp
14
star
10

mercury

💀 ABANDONED: Emacs interface to Facebook Messenger
Python
10
star
11

minimal-webapp

💀 DEPRECATED: Minimal webapp using ClojureScript, Compojure, and Reagent
Clojure
7
star
12

ishikk

💀 ABANDONED: Calendar for the weary fisher.
Emacs Lisp
5
star
13

with-feature

💀 DEPRECATED: Better version of with-eval-after-load.
Emacs Lisp
5
star
14

Watching-Paint-Dry

Java applet where you can add paint and then watch it dry. Yes, really.
Java
4
star
15

elint

💀 DEPRECATED: Small module to deduplicate Elisp build tooling.
Shell
4
star
16

dotman

💀 DEPRECATED: One package manager to rule them all
Python
4
star
17

example-website

Example static site, like my personal website but much simpler
HTML
4
star
18

cs121-hello

Demo for CS 121 "Software Development", Harvey Mudd College Spring 2019.
HTML
4
star
19

straight.el-support

💀 DEPRECATED: examples and benchmarks for https://github.com/raxod502/straight.el
Emacs Lisp
3
star
20

lazy-map

Lazy maps for Clojure.
Clojure
3
star
21

funwithframes

Game where there are a lot of rectangles at the same time.
Processing
3
star
22

contributor-guide

Deduplicate contributor guides.
3
star
23

space-grid

Abandoned plan for a clone of the old Flash game Star Relic
Python
3
star
24

empty

Absolute bare minimum Leiningen template
Clojure
3
star
25

org-emacs

Simple configuration of Emacs optimized for Org mode
Emacs Lisp
3
star
26

mothers-day-2013

Java applet for Mother's Day from 2013.
Java
3
star
27

cs121-whales

CS 121 - Spring 2019
JavaScript
3
star
28

puzzles

Solvers for KenKen and Sudoku puzzles in Clojure
Clojure
2
star
29

dfa

Generate DFAs using genetic algorithm.
Clojure
2
star
30

TI84

Old programs that I wrote for the TI-84 in middle and high school.
2
star
31

MathViewers

Programming projects from high school math classes.
Java
2
star
32

CAS

💀 DEPRECATED: Failed attempt at creating a computer algebra system
Java
2
star
33

ScienceFair

Middle school science fair project: Boolean satisfiability solver applied to Sudoku puzzles.
Python
2
star
34

mothers-day-2021

JavaScript
2
star
35

bug48170-repro

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48170
Emacs Lisp
1
star
36

JFLAP-Autograder

Grades JFLAP student submissions automatically.
Python
1
star
37

juniper-tools

Tools and scripts for Juniper Networks '19-20 HMC Clinic project.
Python
1
star
38

tabcrush

💀 ABANDONED: Crushes table-editing problems.
Emacs Lisp
1
star
39

juniper-linux

Linux kernel for Juniper Networks '19-20 HMC Clinic project
C
1
star
40

pset

💀 ABANDONED: The simplest LaTeX problem-set templating engine that could possibly work.
Python
1
star
41

acc

💀 DEPRECATED: Command-line accounting tool.
Python
1
star
42

VotingLib

Library for studying the comparative effectiveness of different voting systems
Java
1
star
43

tidier-legacy

💀 DEPRECATED: crusty, broken Scala code for cleaning GitHub issues
Shell
1
star
44

mood-tracker

Capture, aggregate, and analyze moods
Shell
1
star
45

fathers-day-2021

JavaScript
1
star
46

profile-dotemacs

My mirror of the Emacs package, with some fixes
Emacs Lisp
1
star