mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the generated doom-package-autoload-file when running make autoloads), many :commands properties are redundant. In fact, many def-package! blocks are redundant. In some cases, we can do without a config.el file entirely, and can move into the autoloads file or rely entirely on package autoloads. Also, many settings have been moved in their module's autoloads files, which makes them available ASAP; their use no longer depends on module load order. This gained me a modest ~10% boost in startup speed.
This commit is contained in:
@ -3,7 +3,8 @@
|
||||
;; Handles whitespace (tabs/spaces) settings externally. This way projects can
|
||||
;; specify their own formatting rules.
|
||||
(def-package! editorconfig
|
||||
:hook (doom-init . editorconfig-mode)
|
||||
:defer 2
|
||||
:after-call doom-before-switch-buffer
|
||||
:config
|
||||
;; Register missing indent variables
|
||||
(setq editorconfig-indentation-alist
|
||||
@ -49,9 +50,7 @@ extension, try to guess one."
|
||||
;; editorconfig to ignore indentation there. I prefer dynamic indentation
|
||||
;; support built into Emacs.
|
||||
(dolist (mode '(emacs-lisp-mode lisp-mode))
|
||||
(map-delete editorconfig-indentation-alist mode)))
|
||||
|
||||
|
||||
(def-package! editorconfig-conf-mode
|
||||
:mode "\\.?editorconfig$")
|
||||
(map-delete editorconfig-indentation-alist mode))
|
||||
|
||||
;;
|
||||
(editorconfig-mode +1))
|
||||
|
Reference in New Issue
Block a user