💥 Rethink core hook order & naming
- doom-post-init-hook was renamed doom-init-modules-hook - doom-init-hook was renamed doom-before-init-modules-hook - doom-init-modules-hook now runs before the user's config.el is run - Moved doom-init-ui-hook to run later (on window-setup-hook rather than emacs-startup-hook). Yield a modest improvement in startup times.
This commit is contained in:
parent
843b29a4b5
commit
05303c0fdb
9 changed files with 55 additions and 46 deletions
|
@ -14,7 +14,9 @@ line with a linewise comment.")
|
|||
(defvar evil-want-Y-yank-to-eol t)
|
||||
|
||||
(def-package! evil
|
||||
:init
|
||||
:hook (doom-init-modules . evil-mode)
|
||||
:demand t
|
||||
:preface
|
||||
(setq evil-want-visual-char-semi-exclusive t
|
||||
evil-magic t
|
||||
evil-echo-state t
|
||||
|
@ -37,18 +39,16 @@ line with a linewise comment.")
|
|||
evil-want-keybinding (not (featurep! +everywhere)))
|
||||
|
||||
:config
|
||||
(load! "+commands")
|
||||
|
||||
(add-hook 'doom-post-init-hook #'evil-mode)
|
||||
(evil-select-search-module 'evil-search-module 'evil-search)
|
||||
|
||||
(put 'evil-define-key* 'lisp-indent-function 'defun)
|
||||
|
||||
;; Done in a hook to ensure the popup rules load as late as possible
|
||||
(defun +evil|init-popup-rules ()
|
||||
(set-popup-rules!
|
||||
'(("^\\*evil-registers" :size 0.3)
|
||||
("^\\*Command Line" :size 8))))
|
||||
(add-hook 'doom-post-init-hook #'+evil|init-popup-rules)
|
||||
(add-hook 'doom-init-modules-hook #'+evil|init-popup-rules)
|
||||
|
||||
;; Change the cursor color in emacs mode
|
||||
(defvar +evil--default-cursor-color
|
||||
|
@ -157,7 +157,10 @@ line with a linewise comment.")
|
|||
|
||||
;; `evil-collection'
|
||||
(when (featurep! +everywhere)
|
||||
(load! "+everywhere")))
|
||||
(load! "+everywhere"))
|
||||
|
||||
;; Custom evil ex commands
|
||||
(load! "+commands"))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -77,7 +77,7 @@ Uses `+workspaces-main' to determine the name of the main workspace."
|
|||
(display-buffer-in-side-window
|
||||
warnings '((window-height . shrink-window-if-larger-than-buffer)))))))))))
|
||||
|
||||
(add-hook 'doom-post-init-hook #'+workspaces|init t)
|
||||
(add-hook 'doom-init-modules-hook #'+workspaces|init t)
|
||||
:config
|
||||
(setq persp-autokill-buffer-on-remove 'kill-weak
|
||||
persp-nil-hidden t
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"If non-nil, obfuscate files and only show what projects you're working on.")
|
||||
|
||||
;;;###autoload
|
||||
(add-hook 'doom-post-init-hook #'+wakatime|delayed-autostart)
|
||||
(add-hook 'doom-init-modules-hook #'+wakatime|delayed-autostart)
|
||||
|
||||
;;;###autoload
|
||||
(defun +wakatime/setup ()
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
;; TODO Add themes (default, minimal, spacemacs, etc)
|
||||
|
||||
(def-package! doom-modeline
|
||||
:hook (doom-post-init . doom-modeline-mode)
|
||||
:preface
|
||||
:hook (after-init . doom-modeline-mode)
|
||||
:init
|
||||
;; prevent flash of unstyled modeline at startup
|
||||
(setq-default mode-line-format nil)
|
||||
;; We display project info in the modeline ourselves
|
||||
(setq projectile-dynamic-mode-line nil)
|
||||
:init
|
||||
;; Set these early so they don't trigger variable watchers
|
||||
(setq doom-modeline-bar-width 3
|
||||
doom-modeline-github nil
|
||||
doom-modeline-mu4e nil
|
||||
|
@ -18,14 +18,13 @@
|
|||
doom-modeline-minor-modes nil
|
||||
doom-modeline-major-mode-icon nil
|
||||
doom-modeline-buffer-file-name-style 'relative-from-project)
|
||||
|
||||
:config
|
||||
(add-hook 'doom-modeline-mode-hook #'size-indication-mode) ; filesize in modeline
|
||||
(add-hook 'doom-modeline-mode-hook #'column-number-mode) ; cursor column in modeline
|
||||
|
||||
:config
|
||||
(add-hook 'doom-big-font-mode-hook #'+modeline|resize-for-big-font)
|
||||
|
||||
(add-hook 'doom-load-theme-hook #'doom-modeline-refresh-bars)
|
||||
|
||||
(add-hook '+doom-dashboard-mode-hook #'doom-modeline-set-project-modeline)
|
||||
|
||||
;; Show indentation style in modeline. I'm not using
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; ui/unicode/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(add-hook 'doom-post-init-hook #'+unicode|init-fonts)
|
||||
(add-hook 'doom-init-ui-hook #'+unicode|init-fonts)
|
||||
|
||||
;;;###autoload
|
||||
(defun +unicode|init-fonts ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue