Aim to port spacemacs features (keybindings, transient states, layers etc) to doom, and provides a spacemacs module for doom emacs.
I personally use it every day, and it works really great with doom.
Estimate that it costs around 0.2 ~ 0.3 second.
There are two ways to setup this module, you can choose either one.
- Setup as Doom Private Module (new method, more “doom-way”) If you find missing packages, welcome PR or request an Issue.
- Load this module directly (old method, you can clone and hack anything if you like)
This is the new method to enable as a private Doom module. It is the easiest way to setup.
- Clone
git clone git@github.com:chenyanming/spacemacs_module_for_doom.git ~/.doom.d/modules/private/spacemacsor
git clone git@github.com:chenyanming/spacemacs_module_for_doom.git ~/.emacs.d/modules/private/spacemacs - Setup ~/.doom.d/init.el
- Add
:private spacemacsintoinit.elafter:defaultgroup - the end ofdoom!section, so that all necessary modules are loaded beforespacemacsmodule - In order to use the windows transient state properly (
SPC w wif windows numbers >=3), please add+numbersforwindows-selectmodule.
(window-select ; visually switch windows +numbers)- Important: Please enable
hydraininit.el
:ui hydra- To enable the spacemacs like dashboard, comment out
doom-dashboard. - To disable default doom keybindings, delete
+bindings, in:config defaultmodule.
- Add
- Setup ~/.doom.d/config.el
- To enable the spacemacs like dashboard, add this:
(add-hook 'doom-init-ui-hook #'spacemacs/home)
- Spacemacs dashboard may consume 0.2 second to boot after testing.
- Configure
dotspacemacs-startup-banner,dotspacemacs-startup-liststo control the dashboard details. - To disable doom org keybindings, add this:
(remove-hook 'org-load-hook #'+org-init-keybinds-h)
- To enable the spacemacs like dashboard, add this:
- Quit Emacs and Run
~./emacs.d/bin/doom sync - Restart Emacs.
This is the old method to enable as a Doom module, it is more complicated but more easy to hack.
git clone git@github.com:chenyanming/spacemacs_module_for_doom.git ~/.doom.d/modules/spacemacsThen follow the following sections one by one, there are 5 steps:
- Setup
init.el - Setup
package.el - Adjust
config.el(This module’sconfig.el) - Setup
config.el - Quit Emacs and Run
./emacs.d/bin/doom sync
Enable necessary modules in init.el.
Make sure enable the necessary modules in init.el.
At lease evil, org, gist, pdf, lookup, workspaces, eshell, and javascript etc.
In order to use the windows transient state properly, please add +numbers for
windows-select module.
(window-select ; visually switch windows
+numbers)To enable the spacemacs like dashboard, comment out doom-dashboard.
To disable default doom keybindings, delete +bindings, in :config default module.
And install the missing packages in packages.el
(package! nov) ;; for epub layer
(package! auto-highlight-symbol) ;; for spacemacs-navigation
(package! eyebrowse) ;; for spacemacs-layouts
(package! bm) ;; for bm layer
(package! evil-iedit-state) ;; for spacemacs-navigation
(package! bind-map)
(package! symbol-overlay)
(package! move-text) ;; for spacemacs-editing
(package! string-inflection) ;; for spacemacs-editing
(package! forge) ;; for github layer
(package! evil-terminal-cursor-changer) ;; for spacemacs evil
(package! eshell-prompt-extras) ;; for shell layerSince this package only simply load the necessary layer files and call their init functions, you can comment out
them in this module’s config.el if necessary.
- Load the this module’s
config.el:(load! "~/.doom.d/modules/spacemacs/config"); important, since I useload-file-nameto determine the module location. - To enable the spacemacs like dashboard, add this:
(add-hook 'doom-init-ui-hook #'spacemacs/home)
- Spacemacs dashboard may consume 0.2 second to boot after testing.
- Configure
dotspacemacs-startup-banner,dotspacemacs-startup-liststo control the dashboard details. - To disable doom org keybindings, add this:
(remove-hook 'org-load-hook #'+org-init-keybinds-h)
Then sync the doom.
Please notice:
If you want to keep sync with my commits, every time you do git pull, you should better run ./emacs.d/bin/doom
sync again, in case the packages.el is updated.
Spacemacs’s transient states are based on hydra, while it seems has some
problems with doom. I am trying to fix it.
You can choose message, lv, or posframe in config.el
e.g. to choose posframe:
(setq hydra-hint-display-type 'posframe)Finally restart emacs~
Enjoy~
- Some Default spacemacs leader keybindings.
- spacemacs-editing
- spacemacs-layouts
- spacemacs-navigation
- spacemacs-defaults
- spacemacs-evil
- org layer keybindings.
- Github layer keybindings.
- PDF layer keybindings.
- epub layer keybindings.
- dash layer keybindings.
- Some transient states:
- Windows Transient State:
SPC-w-. - Symbol Overlay Transient State:
SPC-s-o - Symbol Highlight Transient State:
SPC-s-h/*/# - Buffer Transient State:
SPC-b-. - Error Transient State:
SPC-e-. - Font Scaling Transient State:
SPC-z-x - Frame Transparency Transient State:
SPC-T-T - Layouts Transient State:
SPC-l - Workspaces Transient State:
SPC-l-w - BM Transient State:
SPC-a-b - VCS Transient State:
SPC-g-. - Git Timemachine Transient State:
SPC-g-t - Move Text Transient State:
SPC-x-J, SPC-x-K - String Inflection Transient State:
SPC-x-i-i - Fold Transient State:
SPC-z-. - Evil number Transient State:
SPC-n-+
- Windows Transient State:
- JavaScript layer major mode keybindings.
- Spacemacs Like Dashboard.
