mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Rethink what Doom loads at startup and manually
Better to simply load what we need, when we need it, rather than set up autoloads for every litte thing.
This commit is contained in:
@ -133,6 +133,7 @@ containing (PACKAGE-SYMBOL OLD-VERSION-LIST NEW-VERSION-LIST).
|
||||
If INCLUDE-FROZEN-P is non-nil, check frozen packages as well.
|
||||
|
||||
Used by `doom//packages-update'."
|
||||
(require 'async)
|
||||
(let (quelpa-pkgs elpa-pkgs)
|
||||
;; Separate quelpa from elpa packages
|
||||
(dolist (pkg (doom-get-packages t))
|
||||
|
@ -1,14 +1,15 @@
|
||||
;;; core-lib.el -*- lexical-binding: t; -*-
|
||||
|
||||
(require 'subr-x)
|
||||
(load "async-autoloads" nil t)
|
||||
(dolist (sym '(json-read json-read-file json-read-from-string json-encode))
|
||||
(autoload sym "json"))
|
||||
(eval-and-compile
|
||||
(when (version< emacs-version "26")
|
||||
(with-no-warnings
|
||||
(defalias 'if-let* #'if-let)
|
||||
(defalias 'when-let* #'when-let))))
|
||||
(let ((load-path doom--site-load-path))
|
||||
(require 'subr-x)
|
||||
(require 'cl-lib)
|
||||
(require 'map)
|
||||
(eval-when-compile (require 'use-package)))
|
||||
|
||||
(when (version< emacs-version "26")
|
||||
(with-no-warnings
|
||||
(defalias 'if-let* #'if-let)
|
||||
(defalias 'when-let* #'when-let)))
|
||||
|
||||
|
||||
;;
|
||||
|
@ -155,7 +155,6 @@ ability to invoke the debugger in debug mode."
|
||||
gc-cons-percentage 0.6
|
||||
file-name-handler-alist nil))
|
||||
|
||||
(require 'cl-lib)
|
||||
(load (concat doom-core-dir "core-packages") nil t)
|
||||
(setq load-path (eval-when-compile (doom-initialize t)
|
||||
(doom-initialize-load-path t))
|
||||
|
@ -8,6 +8,7 @@
|
||||
"The last test run.")
|
||||
|
||||
(defun +go--run-tests (args)
|
||||
(require 'async)
|
||||
(save-selected-window
|
||||
(async-shell-command (concat "go test " args))))
|
||||
|
||||
|
@ -11,6 +11,7 @@ ignore the cache."
|
||||
(gethash project-root +javascript-npm-conf))
|
||||
(let ((package-file (expand-file-name "package.json" project-root)))
|
||||
(when-let* ((json (and (file-exists-p package-file)
|
||||
(require 'json)
|
||||
(json-read-file package-file))))
|
||||
(puthash project-root json +javascript-npm-conf))))))
|
||||
|
||||
|
@ -10,5 +10,6 @@ ignore the cache."
|
||||
(or (and (not refresh-p) (gethash project-root +php-composer-conf))
|
||||
(let ((package-file (expand-file-name "composer.json" project-root)))
|
||||
(when-let* ((data (and (file-exists-p package-file)
|
||||
(require 'json)
|
||||
(json-read-file package-file))))
|
||||
(puthash project-root data +php-composer-conf))))))
|
||||
|
@ -58,6 +58,7 @@
|
||||
;; Make expensive php-extras generation async
|
||||
(unless (file-exists-p (concat php-extras-eldoc-functions-file ".el"))
|
||||
(message "Generating PHP eldoc files...")
|
||||
(require 'async)
|
||||
(async-start `(lambda ()
|
||||
,(async-inject-variables "\\`\\(load-path\\|php-extras-eldoc-functions-file\\)$")
|
||||
(require 'php-extras-gen-eldoc)
|
||||
|
Reference in New Issue
Block a user