The basic layout of this emacs configuration and the basis for grm-mode and grm-leader mode are all taken from a user named Junpeng Qiu. Find their config here.
The principle for requiring code is very simple and relies on require
directly.
There is a macro called grm-require
which wraps require
and saves timings for custom module names to be inspected
after initialization.
Initialization will attempt to install any packages present in the custom config file, startup/grm-custom.el
.
After that, modules from modules/grm-modules-init.el
are required.
Finally, initialize finishes with startup/grm-startup-finalize.el
The modules directory contains configuration for emacs, and all the installed packages.
The first thing to be loaded is grm-visual
which controls the basic aspects of what emacs will look like.
Check here for the relevant fonts to have installed, as well as the theme that should be installed by adding it to
grm-custom.el
.
This mode does some crazy stuff that I don’t totally understand.
There is a defcustom configured for a leader key called grm-leader-literal-key
.
There is special handling of C-c
, C-x
, C-h
in that it will be that when you press the next key
as a single key, it will also send it with C-
. So to use C-c C-c
from the leader, you enter SPC c c
and to
use C-c c
, SPC c SPC c
.
This is a minor-mode that attempts to have priority keybindings and is enabled globally.
That’s really all it does, it’s keymap is grm-mode-map
.
prefix-command
maps will be nested and commands in the main map and nested maps.
(define-prefix-command 'ctrl-c-q-map)
(define-key grm-mode-map (kbd "C-c q") 'ctrl-c-q-map)
(define-key ctrl-c-q-map (kbd "R") 'restart-emacs)
(define-key grm-mode-map (kbd "C-x C-1") 'delete-other-windows)
The misc
section has a special loader that loads files from the misc/
directory.
Modules that are listed in grm-enabled-misc-settings-list
will be loaded.
Here are bindings set in grm-mode-map.
They work both by C-c g
, etc. and by the grm-leader with SPC g
.
Here is some configuration for things like history, backup files, winner-mode, default fill-column.
Loads magit.
Minibuffer optimization from DOOM. Other performance related helpers and setup welcome here.
Loads which-key, set some configuration, and a function to show keymap at the top level.
File templates.
Cursor highlight.