Skip to content
 
 

Repository files navigation

Build Status Support me

cdadar's emacs config

This is my own config based on Purcell's configuration. The upstream repo is https://github.com/purcell/emacs.d

A reasonable Emacs config

This is my emacs configuration tree, continually used and tweaked since 2000, and it may be a good starting point for other Emacs users, especially web developers. These days it's somewhat geared towards OS X, but it is known to also work on Linux and Windows.

Emacs itself comes with support for many programming languages. This config adds improved defaults and extended support for the following, listed in the approximate order of how much I use them, from most to least:

  • Haskell / Purescript / Elm / OCaml
  • Ruby / Ruby on Rails
  • SQL
  • CSS / LESS / SASS / SCSS
  • Javascript / Typescript
  • HTML / HAML / Markdown / Textile / ERB
  • Common Lisp (with Slime)
  • Python
  • Rust
  • Clojure (with Cider and nRepl)
  • PHP
  • Erlang

Included is a nice setup for in-buffer autocompletion with corfu, and minibuffer completion using vertico.

flymake (re-using backends from flycheck) is used to immediately highlight syntax errors in Ruby, Python, Javascript, Haskell and a number of other languages.

LSP support is provided using eglot.

Package management uses use-package

Various popular Emacs tools are included and configured here, such as magit, docker.el, projectile, org-mode etc., but the focus is moderate

Supported Emacs versions

Use the latest released Emacs version available to you. The author usually uses the latest stable version.

The minimum supported Emacs version is 29.1. The CI workflow currently tests Emacs 29.1 through 30.2, plus snapshot builds, but in general you should try to use the latest stable Emacs release.

Other requirements

To make the most of the programming language-specific support in this config, further programs will likely be required, particularly those that flycheck or flymake use to provide on-the-fly syntax checking.

Installation

To install, clone this repo to ~/.emacs.d, i.e. ensure that the init.el contained in this repo ends up at ~/.emacs.d/init.el:

git clone https://github.com/cdadar/emacs.d.git ~/.emacs.d

Note: Start Emacs with the minimal configuration for fast startup and troubleshooting.

emacs -Q -l ~/.emacs.d/init-mini.el

Agent guidance

This repository includes project-level guidance for AI coding agents:

  • CLAUDE.md for Claude Code
  • AGENTS.md for Codex, OpenCode, and similar agents

Keep these two files aligned when repository conventions, supported Emacs versions, or verification workflows change.

Updates

Update the config with git pull. You'll probably also want/need to update the third-party packages regularly too, because that's what I do, and the config assumes it:

M-x package-list-packages, then U followed by x.

You should usually restart Emacs after pulling changes or updating packages so that they can take effect. Emacs should usually restore your working buffers when you restart due to this configuration's use of the desktop and session packages.

Changing themes and adding your own customization

To add your own customization, use M-x customize, M-x customize-themes etc. and/or create a file ~/.emacs.d/lisp/init-local.el which looks like this:

... your code here ...

(provide 'init-local)

If you need initialisation code which executes earlier in the startup process, you can also create an ~/.emacs.d/lisp/init-preload-local.el file.

If you plan to customize things more extensively, you should probably just fork the repo and hack away at the config to make it your own! Remember to regularly merge in changes from this repo, so that your config remains compatible with the latest package and Emacs versions.

About

An Emacs configuration bundle with batteries included

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages