QiangF / CleanEmacs-master

My .emacs.d.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CleanEmacs

.assets/logo.png

[23-06-14 21:38:16]

This is my personal Emacs config. I migrated from DOOM because updating it was a hassle owing to my extensive config.

I’ve been using Doom Emacs for four years, and I wanted my config to be a lighter version of the same. Hence, I’ve tried to stick as close to the keybinds I’m used to. Other parts of this config also offer Doom-like functionality.

We don’t aim this config to be minimal, but instead to be easy to understand.

Recommended Emacs Version
30.0.50
Current Emacs commit
d3e650d33709c6323b9e2346a951d5eb5ff82b44
Recommended OS
I use Debian Stable. This config might work on MacOS and WSL. I don’t use either, so no guarantees.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-09-06 built on debhost2 Repository revision: d3e650d33709c6323b9e2346a951d5eb5ff82b44 Repository branch: master Windowing system distributor ‘The X.Org Foundation’, version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm)

Configured using: ‘configure –with-native-compilation=aot ‘CFLAGS=-flto -O3 -mtune=native -march=native -fomit-frame-pointer’ –enable-autodepend –enable-link-time-optimization –with-dbus –with-gif –with-gnutls –with-gpm=no –with-imagemagick –with-jpeg –with-json –with-libotf –with-mailutils –with-modules –without-compress-install –without-gconf –without-gsettings –without-xaw3d –with-png –with-sound –with-sqlite3 –with-tiff –with-toolkit-scroll-bars –with-webp –with-xft –with-xim –with-xpm –with-tree-sitter –with-x-toolkit –with-xwidgets’

General Outline

Hierarchy

early-init.el
Sets some defaults, calls early-init-ui.el
early-init-ui.el
Defines some faces for modeline.el and disables the menu bar and other stuff.
init.el
Only loads files. Loads elpaca-init.el first, and other package-agnostic configuration files are called after.
elpaca-init.el
Load elpaca and set some custom vars with cache / user directory locations
general.el
Defines emacs-wide user options and enables some global minor-modes.
functions.el
Dumping ground for functions and Transients.
keybinds.el
Defines keybinds, uses general-def.
hooks.el
Hooks that are too general to warrant a separate file.
ui.el
Sets the theme, fonts and modifies a few faces.
modeline.el
Should be named ”headerline.el”. Defines and propertize s functions that show information about the buffer, and display s them. Disables the mode-line and instead uses the header-line. Light-weight and inherits colors from the active theme.
modes.el
For treesit configuration.
loads.el
Loads files that aren’t tracked in this project.

Package Management

We use Elpaca to manage packages. It’s very easy to set up, and works well with native-compilation. The user does not need to intervene.

Inspired by Doom, this config uses separate module-like configuration files for every package. This is aided by a small custom function (elpacaLF) that creates a config file for a package when it is installed for the first time, and loads the file. The config is just a use-package block with :elpaca (if necessary).

Internal packages can also be configured. They use :elpaca nil .

If you don’t like the package, you can remove the corresponding elpacaLF invocation and the package will be completely ignored on the next startup / eval. Packages can also be installed by eval ing a new elpacaLF invocation.

All packages will be :pin ned shortly, to make this reproducible.

Vim Emulation

We use evil for Vim Emulation. As a Vim refugee, I’ve tried many times to get used to Emacs’ keybinds, but I keep going back to the simplicity of modal editing.

Keybinds

We use general.el for keybinds.

Additional modifiers used
Hyper. Use xmodmap to convert a key to Hyper.

Headerline

The Headerline is mostly just a propertized default modeline. It uses face-remapping-alist to change the face for the header-line depending on (buffer-modified-p). The name of the current buffer is relative to the project root (if found). We also cache the name of the current buffer (picked up from doom-modeline’s “light” variant). The active buffer also has two indicators on either extreme end.

Making it your own

As of [23-06-14 22:28:53] , this config is still a work in progress but ~90% to STABLE status. It lacks language-specific configuration and some ease-of-use modifications. Those will be added in time, but if you’re a former Doom Emacs user, you can use this config as a starting point.

What you need to do:

  • Clone to ~/.emacs.d. Alternatively, use Chemacs to enable multiple configs.
  • Search for ~/ and sys2 and remove / modify all local filesystem calls.

Update [23-09-06 18:07:21] : This project is about ~95% stable. There are no overt bugs or surprises, almost everything works well and with speed. Language support has been added, along with many small improvements. The emacs version has also been bumped, but no changes have been necessary.

Screenshots

.assets/screenshot1.jpg .assets/screenshot2.jpg .assets/screenshot3.jpg .assets/screenshot4.jpg

About

My .emacs.d.

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%