Skip to content

My Lisp code available for you to build upon or learn from

License

Notifications You must be signed in to change notification settings

enzuru/.emacs.d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

enzu.ru .emacs.d

exwm on Slackware

This .emacs.d represents my libre attempt to build and document an advanced Emacs configuration utilizing most (but not all) of the latest trends in the Emacs community, tailored of course to my personal taste and needs. This is a maximalist configuration; my Lisp code harmoniously integrates around 200 different packages.

This means spicy choices like:

  • eglot over lsp-mode
  • vert&co over helm and ivy
  • corfu over company
  • straight.el over package.el
  • flymake over flycheck (what a comeback!)
  • meow over evil
  • lispy over paredit
  • sly over slime
  • prism over rainbow-delimiters and rainbow-blocks
  • gptel over the dozens of other LLM clients

When I was starting off with Emacs, other people's customizations were deeply helpful for me as a starting point; some of those customizations still find a home in my Emacs instance today. In the spirit of free software, I hope that I can pass on the good will.

Requirements

This config makes extensive use of language servers and tree-sitter grammars. Most of my best supported languages will try to load a language server or tree-sitter grammar. If it fails to, it will warn you and give you a chance to install what is missing.

I usually only support one version of Emacs at a time. Currently I am supporting:

  • Emacs 29
  • Emacs 30

Features

Operating systems

The following operating systems are supported:

Additionally, this entire .emacs.d can be setup with native compilation, all necessary development environments below, and as your window manager by visiting my profiles repo, which can be executed on the Guix GNU/Linux distribution.

Development environments

This Emacs configuration reflects my REPL-centered exploratory programming style.

I provide an IDE and REPL for each major environment that I work in.

One can debate about which languages Emacs is actually ideal for, but Emacs is certainly a best-in-class environment for Haskell, Elixir, Common Lisp, Scheme, and Clojure.

First class

The best supported developer environments are the Lisp languages. Since they have feature rich IDEs with powerful REPLs, they do not need Eglot, and arguably Lisp with its ascetic syntax benefits less from tree-sitter.

Language IDE REPL Eglot Tree-sitter
Clojure CIDER CIDER N/A Yes
Common Lisp SLY SLY N/A No
Scheme Geiser Geiser N/A No

Second class

These languages have support for both Eglot and tree-sitter.

Language IDE REPL Eglot Tree-sitter
C c-ts-mode Yes Yes
C++ c++-ts-mode Yes Yes
Go go-ts-mode go-playground Yes Yes
Python Anaconda run-python Yes Yes
Ruby Robe inf-ruby Yes Yes
Rust Racer rust-playground Yes Yes

Third class

I do not support Eglot for these languages. Generally it is because GNU Guix does not have an appropriate language server packaged for them yet.

Language IDE REPL Eglot Tree-sitter
Elixir Alchemist inf-elixir No Yes
Fish fish-mode fish-completion No No
Haskell Intero Dante No No
JavaScript js2-mode Indium No No
PHP php-mode PsySH No No
SQL sql-mode emacsql No No
TypeScript Tide Indium No Yes

Fourth class

I don't even have a REPL for these languages, and quite frankly, most of these languages are best used within their respective IDEs.

Language IDE REPL Eglot Tree-sitter
GDScript gdscript-mode Yes No
Groovy groovy-mode No No
Java java-ts-mode No Yes
Kotlin kotlin-mode No No
Objective-C objc-mode No No
Swift swift-mode No No

Tools

This configuration ships with a great many helpful tools:

Feature Tool
Benchmarker elisp-benchmarks
Bug tracker debbugs
Clipboard Clipetty
Completion (regular buffer) Corfu
Completion (minibuffer) Vert&co
Dashboard Dashboard
Docker client docker.el
Documentation searcher devdocs
Evaluation overlay eros
Gemini browser Elpher
HTTP browser EWW
Hyperlinker Hyperbole
IRC client ERC
Kubernetes client kubernetes-el
LLM client gptel
LSP client Eglot
Mail client Gnus
Mail indexer Notmuch
Modal editor Meow, Lispy
Modeline Smart Mode Line
MUD client mu.el
Music player Emms
Music streamer pianobar.el
Organization org-mode
Project interaction project.el
REST client restclient.el
Shell Eshell
Spreadsheets Dismal
Syntax checker flymake
Syntax highlighter prism
Terminal Eat
Undo visualizer undo-tree
Version control Magit
Wikipedia editor mediawiki.el
Window configuration winner-mode
Window handling windmove
Window manager exwm

Themes

There are many beautiful theme families for you to enjoy:

Package managers

Package management is provided by:

Keystrokes

This is a modal editing setup that uses two different modal editors: Meow and Lispy. Lispy is only for Lisp languages.

I maintain the default Emacs keybindings, so I will not document them here. Meow will help you discover keystrokes after you hit SPC.

Normal editing

Meow cheat sheet

Run meow-tutor to learn Meow.

Meow documentation

Lisp editing

Lispy editing is activated only in major modes for Lisp languages when around parens in Meow's insert mode.

  • e evaluate s-expression
  • f forward point through parens
  • b undo
  • ] move point down
  • [ move point up
  • > slurp up next s-expression
  • < barf up s-expression
  • w move s-expression up
  • s move s-expression down
  • r raise s-expression
  • C-1 view documentation
  • C-2 view caller arguments

Lispy documentation

Movement between buffers

Movement between buffers is accomplished with windmove:

  • Shift-up
  • Shift-left
  • Shift-right
  • Shift-down

Tab management

I have keystrokes setup to emulate tmux/screen using Emacs tabs.

  • C-z(one) c(reates) a new workspace.
  • C-z(one) k(ills) a current workspace.
  • C-z(one) n(ext) workspace.
  • C-z(one) p(revious) workspace.

Custom keystrokes

These are custom keystrokes that I have setup:

  • SPC a(g) search git repo using ag
  • SPC b(uffer) switch buffers with autocompletion
  • SPC i(sp) search through Lisp symbols (defaults to Emacs Lisp)
  • SPC d(ocumentation) brings up documentation for symbol under cursor
  • SPC e(at) brings up the Eat terminal
  • SPC k(ill) kill buffer unconditionally
  • SPC l(ocate) locate a file
  • SPC o(mpile) compiles the buffer in a language appropriate way
  • SPC p(ush) pushes the current git branch
  • SPC r(eplace string) replace all occurrences of a string after point
  • SPC s(tatus) shows the current git status
  • SPC t(abs) search through tabs
  • SPC y(ank) show list of yanked items

The arrow keys help you manage buffers:

  • SPC <left> previous buffer
  • SPC <right> next buffer
  • SPC <up> beginning of buffer
  • SPC <bottom> bottom of buffer

Learning

Everything is very organized in the enzuru folder by feature, mode, preference, setup, operating system, and theme. While this repo should work immediately for you on a git pull, it's obviously a very personalized setup and many things won't appeal to you. If I were you, I would first take a look at my init.el and then pick a topical elisp file from there.

Happy hacking!

License

Licensed under the GPLv3; copyright is assigned to my eponymous charity enzu.ru

About

My Lisp code available for you to build upon or learn from

Topics

Resources

License

Stars

Watchers

Forks