haditim/dotemacs
1
7
Fork
You've already forked dotemacs
4
A lightweight replacement for Doom Emacs
  • Emacs Lisp 100%
Find a file
2026年07月07日 14:45:46 +02:00
modules make local backups when editing files remotely over tramp 2026年07月07日 14:45:46 +02:00
.gitignore better desktop-save-mode 2023年07月20日 20:52:34 +02:00
early-init.el some ported changes from emacs-solo 2025年03月24日 01:48:55 +01:00
emacs-logo.png update scratch message and failing png file opening 2024年10月12日 18:34:51 +02:00
init.el completion only on TAB + completion-preview-mode always on 2026年02月16日 18:59:48 +01:00
LICENSE update README, add LICENSE 2023年07月27日 20:46:31 +02:00
README.org correct link to keybind modules in readme #2 2026年04月23日 15:03:19 +02:00
screenshot1.png make screenshots smaller 2024年12月30日 22:26:25 +01:00
screenshot2.png make screenshots smaller 2024年12月30日 22:26:25 +01:00
screenshot3.png add terminal screenshot 2024年12月30日 22:34:51 +01:00
screenshot_mobile.png smaller mobile screenshot 2024年05月11日 18:50:55 +02:00

dotemacs

This project is an effort to replace Doom Emacs with my own configuration while keeping the keybinding and most of the functionality as similar as possible. The configurations still lack many of functionalities that my Doom config offers. But I constantly improve them as this project is my current setup. I still use Doom from time to time and browse its code to check how things are done for inspiration.

Screenshots

  • Dark mode

/haditim/dotemacs/media/branch/master/screenshot1.png

  • Light mode

/haditim/dotemacs/media/branch/master/screenshot2.png

  • In terminal (foot terminal)

/haditim/dotemacs/media/branch/master/screenshot3.png

  • Android (dark mode) on Samsung Galaxy S22 Ultra (using Termux:X11)

/haditim/dotemacs/media/branch/master/screenshot_mobile.png

Motivation

Speed

Doom Emacs meets most of my expectations of an IDE for software development and note taking. However, having to use it in a virtualized environment for a long time recently, I experienced slowdowns and high resource consumption over time. Doom does an amazing job loading only necessary features and lazily, optimizing startup speed and the overall feel. Nevertheless, the big number of packages that come bundled with it eventually make it slower with time. Many of the functionality these packages offer are now built into Emacs but cannot be easily replaced. This convinced me to start building my Emacs configs bottom-up rather than trying to make Doom faster by taking the bloat away.

Simplicity

Doom is complex, so many advice and macros are included that I for one could not wrap my head around many of them for modifications. More magic means less control. I decided to build my config as simple as possible, no advice, no macros, no complexity (also because I don't know how to use advice and macros).

Minimalism

Here I try to minimize the number of packages loaded into Emacs and constantly check the loaded ones to avoid slowdowns caused by them. As an example, I use built-in projects and tab-bar-mode instead of projectile and pers/perspective which handle most of what I expect from them alright.

Installation/Usage (on GNU/Linux)

This repo is tested on Debian, Alpine and Arch GNU/linux distros but should work on other distros, too.

Install emacs

From your distro package manager

I recently moved to lucid toolkit version of emacs since the PGTK can be very slow to navigate, especially on HiDPI monitors.

sudo apt install emacs-lucid # Debian-based distros
sudo pacman -Sy emacs-lucid # Arch-based distros
Building emacs from source (optional)

Version 28+ is supported although 29+ is recommended. Most distros' package managers have version 30 as the default now. Nevertheless, you can compile from source with other branches of the repo:

./configure --prefix=~/.local --without-compress-install --with-native-compilation=no \
 --with-tree-sitter --with-x-toolkit=lucid --with-imagemagick \
 --with-small-ja-dic --with-cairo-xcb

NOTE 1: Cairo gives me errors on Sway/Debian combination, so I drop it (--without-cairo flag which does not always work) or go directly for Emacs version 30 branch. For imagemagick and json you'd need to install libmagickwand-dev and libjansson-dev, respectively.

NOTE 2: Lucid x-toolkit seems to be the fastest (albeit by a slight margin), even on Wayland. Thus, I moved from pgtk to Lucid. You need to install libxaw-dev to be installed or change --with-x-toolkit=lucid to --with-pgtk --without-x.

Install/download requirements

vterm

If you plan to use vterm, you need to install build-essential (or build-base) and make cmake gcc libtool.

Nerd-icons

After packages are installed and emacs is loaded, run M-x nerd-icons-install-fonts and restart emacs for icons to show up.

pdf-tools (optional)

If you view PDF files in Emacs, you need to also run M-x pdf-tools-install after loading.

Download font (optional)

Aporetic font is used in my configs. You can download and install it, or change the module my-looks.el to use another font. The config will fall back to default if desired fonts are not found.

git clone --depth 1 https://github.com/protesilaos/aporetic ~/.local/share/fonts/
(org) screenshots

To be able to paste screenshots using org-download, you need grim tool to be installed.

Clone this repo

You can clone this to ~/.config/emacs (or ~/.emacs.d):

mv ~/.config/emacs ~/.config/emacs.bak
git clone https://codeberg.org/haditim/dotemacs.git ~/.config/emacs

Installation/Usage (on Android)

Refer to my post for installation on Android here. You need to take other steps mentioned above if you want fonts/pdf tools, etc..

Getting started

Make sure treesitter grammar for the language you're developing in is installed by running treesit-install-language-grammar.

Python

I use this configuration mainly for Python development with the following amenities:

  • A custom virtual env selector which is a strong alternative to pyvenv, poetry and conda dependencies which works well over tramp with conda/poetry/python-venv environments. This can be called with my/python-venv-mode (also local leader binding , m e). The minor mode also shows env info in mode line.
  • LSP support with eglot. Just install the LSP server in your environment and run eglot after setting the env (, e).
  • Quick REPL interactions with my/restart-python-repl (also bound to , m r). If you do SPC u before calling the function, you can call the REPL with a custom interpreter (e.g. ipython). If you later want to restart REPL with the custom interpreter you chose before, you can call my/restart-python-repl-last-interpreter (, m R).
  • Debugging using dape which is an amazing package dominating my Python interactions. Just call dape (SPC d d) and pick from available configs. I also have streamlit config as well as debupy-remote and debugpy-file-remote-forwarded-port which help with streamlit and tramp-managed projects.
  • Docstring management with python-docstring and numpydoc.

Micropython

As I like to be able to talk to ESP32 (and other micropython-managed micro controllers), I added some REPL interactions as I have for normal Python to the config. If you call my/start-micropython, you can select the device and send buffer or region to that device, even if it is connected to a remote machine.

Other languages

I also have basic support for the following:

  • C
  • Typescript/Javascript (mostly via treesitter)
  • Flutter/Dart (no treesitter available yet). Remember to run flutter config --disable-analytics to prevent it from dialing home!

LaTeX

CDLaTeX is enabled for org-mode and LaTeX buffers. Use C-c { to get completions for TeX elements.

Keyboard shortcuts

I use general and which-key to manage keybindings. All the keybindings are in my-evil-keybinds.el. There are two type of keybinds in my config; vanilla and vim (default). If you prefer vanilla keybinds, set (setq my/vanilla-editing t) in my-variables.el (create the file where the init.el is if it does not exist). But beware, the vanilla keybinds are not as polished as the vim (evil) version since I mostly use the latter. Changing to vanilla keybinds make my-vanilla-keybinds.el the default keybindings.

Start by typing <space> (in evil version) or M-<space> in vanilla version and which-key will guide you for the rest of keybinds. Local leader is bound to , and C-, for the evil and vanilla states, accordingly.

Switch themes

By typing SPC t a you get a random theme based on whether my/dark-mode is on (which it is by default). To toggle dark mode, type SPC t d.