Finally, a simple base Emacs configuration framework
The flagship theme used by Spartan Emacs is a minimal fork of Nano Emacs originally designed by the great Rougier.
Spartan Emacs does not teach Emacs. If you are new, and please begin by checking out M-x help-with-tutorial
.
M-x
means (Alt
+ x
) and then help-with-tutorial
Return (enter) to begin. One might follow up with An Introduction to Programming in Emacs Lisp
additionally. The manuals may all be found at https://www.gnu.org/software/emacs/manual/
The author has also freely created an Emacs tutorial mini-course available on YouTube,
Emacs hacking 00 - Avoid RSI and “emacs pinky” once and for all.
Emacs hacking 01 - Vanilla Emacs Crash Course Emacs basics: PATH, ENV, moving the cursor, killing lines, copy, cut, paste, undo, redo, creating files, dired, buffers, windows, splits, open file, close file, temp files and lock files, customization via init.el, emacs notation, discoverability, package managers, melpa and evil mode.
Emacs hacking 02 - Vanilla Emacs Crash Course PT. 2 [un]comment a line, find & replace, –debug-init, write a emacs lisp function, bind a function to a key, the messages & scratch buffers, macros, terminals, keybinding conventions, Emacs vs. Vim workflows, use gpg to encrypt and decrypt files, irc, gnus (email), eww (browser), exwm, init’ing linux with Emacs
Emacs hacking 03 - Crash Course PT. 3, org-mode, ediff, Magit, Projectile and more. A Devops Engineer in his native habitat
Emacs hacking 04 - Emacs TRAMP Crash Course PT. 4 Remote file editing via Emacs tramp. GUI vs. Emacs terminal mode.
Emacs hacking 05 - More CRUX goodies - Emacs Crash Course PT. 5
**Emacs hacking 06 - Spartan Emacs - Crash Course PT. 6** A more minimal doom or spacemacs Emacs alternative
KISS philosophy executed well: Keeping true to the UNIX mindset — no excessive abstraction, no opaque magic. It’s clean, readable, and hackable.
Excellent use of straight.el and version pinning: The update model is clean, transparent, and avoids user surprises.
Sensibly deferred configuration: Startup time under 1s with full features.
User-centric design: Customization is pushed where it belongs — into spartan.el.
Pragmatic language layer support: Good balance between batteries-included and hands-off. It’s minimal but covers real workflows.
Not beginner-friendly: By design — not a flaw — but it’s worth mentioning that users who are Emacs-inexperienced may have a harder time with Spartan than with Doom or Spacemacs.
No module system: While we do support layers, it’s not quite as robust or introspectable as Doom’s :feature or :lang modules. That might limit advanced layer reuse.
Lacks optional tooling niceties: Doom’s “Doctor”, autoloads, profiling tools, and Spacemacs’s helpful layer documentation give them a boost in polish.
Spartan is more lean-and-mean.
Feature/Philosophy | **Spartan Emacs** | **Doom Emacs** | **Spacemacs** |
------------------- | ------------------- | ------------------- | ------------------- |
Philosophy | KISS | Minimal but opinionated | Full-featured / maximalist |
Customization model | `spartan.el` | `config.el`/`init.el`/`packages.el` | `.spacemacs` |
Learning curve | Medium | Medium | Medium–Low |
Performance | ⭐ **Very fast** | Fast | Slower (esp. with Evil) |
Ease of hacking | ⭐ **Best** | Good (macros-heavy) | Worse (macro abstraction) |
Layer/module system | Minimal and transparent | Advanced & optimized | Feature-rich but bloated |
Autonomy / Control | High | High | Medium |
Update Model | Git pull + M-x straight-thaw-versions | Doom sync | Layer update commands |
If Doom is for tinkerers who want a fast, curated power tool, and Spacemacs is for those who want an IDE-like experience out of the box, then Spartan Emacs is for power users who want full control and zero bullshit.
Spartan is ideal for Linux people, minimalists, hackers, and ex-Vimers who don’t want a framework that second-guesses them.
- KISS, clean configuration and a comprehensible layers system with minimal abstraction, (easy to hack on to make it “yours.”)
- Uses lightweight, mostly-vanilla configured layer packages
- Straight + use-package version version pinning for greater stability (pins are updated here approximately once a month.)
- Popular langs come with optional layers that are preconfigured with eglot LSP and company mode
- Project Awareness is available with Projectile, and Magit
- Everything is deferred as much as is reasonable, for <1 second initial load times with all layers enabled
- Holy mode is default, while evil mode is available
- Vertico minibuffer with fuzzy completion
- Tested on Linux, but should work also work fine anywhere for the most part.
- Tuned for ultimate performance using the latest gccemacs with native json parsing with eglot language server protocol (not required, just recommended.)
- Treesitter enabled everywhere by default
git clone https://github.com/a-schaefers/spartan-emacs.git ~/.emacs.d
Layers use pinned packages via Straight.el and are periodically updated.
- git pull
- M-x spartan-update-config-with-ediff
It is essential to ensure you have the latest configuration changes merged from spartan-defaults.el, if there are any - to avoid breakage. This is the user’s responsibility at the end of the day. In a worst case scenario, just rm ~/.emacs.d/spartan.el (consider backing it up first, though) and allow the new version to be regenerated on the next restart.
- M-x straight-thaw-versions
- Restart Emacs
- Edit
.emacs.d/spartan.el
to configure the theme, fonts, and additional layers and packages, then restart
init.el (among other things) auto-generates a default ~/.emacs.d/spartan.el
This configuration file is not stored in our Git, but you might want to add it in to yours.
It may freely be modified by the user.
The idea here is to provide everywhere the get up and going configuration, this means proper syntax support,
auto-completion and find definition, etc. via eglot’s minimal language server protocol implementation.
Some of the language modes also include repls. Debugging is provided within many of the languages themselves,
e.g. Python has pdb. With C, one may use M-x gdb
, etc.
We have an eye towards https://github.com/svaante/dape once configuration and usage becomes clear.
With compiled languages, one might use M-x cc and set the compile-command to something instead of make if needed, etc.
- Default emacs binds (unless you enable evil.)
- Short M-x aliases
- M-x git (magit)
- M-x pro (projectile-commander)
- M-x sh (better-shell)
- M-x lint (flymake)
- M-x cc (compile-command)
- etc…
- Language mode specific binds should be handled by the mode upstream or by the individual user with overrides in spartan.el