From b7d0f4dc3f75992c9405a0b0359701df3253bd44 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 19 Aug 2017 21:58:51 +0200 Subject: [PATCH] Simplify modules/private/README.org (replaced by wiki) --- modules/private/README.org | 67 +++----------------------------------- 1 file changed, 4 insertions(+), 63 deletions(-) diff --git a/modules/private/README.org b/modules/private/README.org index 8b804c47e..1046141fa 100644 --- a/modules/private/README.org +++ b/modules/private/README.org @@ -1,67 +1,8 @@ #+TITLE: :private modules -Place your personal customizations here. My private module is there for reference. I recommend you do not delete/rename it, but instead, copy it to your own. +Use this directory to store your private configuration modules. -- [[#loading-your-private-module][Loading your private module]] -- [[#reconfiguring-packages][Reconfiguring packages]] -- [[#installing-your-own-packages][Installing your own packages]] +Mine is included as a reference. I recommend you neither delete nor rename it, to avoid merge conflicts upstream. -* Loading your private module -+ ~:private {user-login-name}~ is loaded automatically after all other modules. - - Keeping it in your init.el is unnecessary, but harmless. - -+ ~private/{user-login-name}/init.el~ is a special file, unique to the private module named after your username in ~user-login-name~. It is loaded immediately after DOOM core is, but before any module is. This gives you an opportunity to overwrite variables and settings earlier. I will refer to this as your "private init.el". - -* Reconfiguring packages -If your configuration needs are simple, ~add-hook!~ and ~after!~ will be sufficient to reconfigure packages: - -#+BEGIN_SRC emacs-lisp -;; private/hlissner/config.el - -(after! evil - (setq evil-magic nil)) - -;; Takes a major-mode or a quoted hook function -(add-hook! python-mode - (setq python-shell-interpreter "bpython")) -#+END_SRC - -Look into ~def-package-hook!~ if you need more customizability. It lets you disable, add to or overwrite DOOM's ~def-package!~ blocks. These are powered by ~use-package~'s inject-hooks under the hood. - -*They must be used from your private init.el to work.* - -#+BEGIN_SRC emacs-lisp -;; private/hlissner/init.el - -;; To disable a package -(def-package-hook! evil-goggles :disable) - -;; If a :pre-init / :pre-config hook returns nil, it overwrites that -;; package's original :init / :config block. Exploit this to overwrite -;; DOOM's config. Otherwise, make sure they always return non-nil! -(def-package-hook! doom-themes - :pre-config - (setq doom-neotree-file-icons t) - nil) - -;; Otherwise, you append to a packages config -(def-package-hook! evil - :pre-init - (setq evil-magic nil) - t) - -;; `def-package-hook' also has :post-init and :post-config hooks -#+END_SRC - -* Installing your own packages -Your private module is otherwise like any other module. It may possess a packages.el file, which -- with the advantage of being loaded last -- may be used not only to install your own packages, but overwrite past ~package!~ declarations. - -#+BEGIN_SRC emacs-lisp -;; prevent a certain package from being installed; pair this with something -;; like (def-package-hook! evil-goggles :disable) in your private init.el -(package! evil-goggles :ignore t) - -;; Tell doom to get evil from somewhere else -(package! evil :recipe (:fetcher github :repo "hlissner/my-evil-fork")) -#+END_SRC +----- +You'll find [[/wiki/Customization][more information about customizing Doom]] on the [[/wiki][wiki]].