mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-11 02:21:14 +10:00
Updating dotfiles.
This commit is contained in:
@@ -97,9 +97,11 @@ uses a straight or package.el command directly).")
|
||||
;; we don't have to deal with them at all.
|
||||
autoload-compute-prefixes nil
|
||||
;; We handle it ourselves
|
||||
straight-fix-org nil
|
||||
;; HACK Disable native-compilation for some troublesome files
|
||||
comp-deferred-compilation-black-list '("/evil-collection-vterm\\.el$"))
|
||||
straight-fix-org nil)
|
||||
|
||||
(with-eval-after-load 'straight
|
||||
;; `let-alist' is built into Emacs 26 and onwards
|
||||
(add-to-list 'straight-built-in-pseudo-packages 'let-alist))
|
||||
|
||||
(defadvice! doom--read-pinned-packages-a (orig-fn &rest args)
|
||||
"Read `:pin's in `doom-packages' on top of straight's lockfiles."
|
||||
@@ -126,7 +128,8 @@ uses a straight or package.el command directly).")
|
||||
((null pin)
|
||||
(funcall call "git" "clone" "--origin" "origin" repo-url repo-dir
|
||||
"--depth" (number-to-string straight-vc-git-default-clone-depth)
|
||||
"--branch" straight-repository-branch))
|
||||
"--branch" straight-repository-branch
|
||||
"--single-branch" "--no-tags"))
|
||||
((integerp straight-vc-git-default-clone-depth)
|
||||
(make-directory repo-dir t)
|
||||
(let ((default-directory repo-dir))
|
||||
@@ -134,7 +137,8 @@ uses a straight or package.el command directly).")
|
||||
(funcall call "git" "checkout" "-b" straight-repository-branch)
|
||||
(funcall call "git" "remote" "add" "origin" repo-url)
|
||||
(funcall call "git" "fetch" "origin" pin
|
||||
"--depth" (number-to-string straight-vc-git-default-clone-depth))
|
||||
"--depth" (number-to-string straight-vc-git-default-clone-depth)
|
||||
"--no-tags")
|
||||
(funcall call "git" "checkout" "--detach" pin)))))
|
||||
(require 'straight (concat repo-dir "/straight.el"))
|
||||
(doom-log "Initializing recipes")
|
||||
@@ -184,10 +188,20 @@ processed."
|
||||
(error "Failed to read any packages"))
|
||||
(dolist (package doom-packages)
|
||||
(cl-destructuring-bind
|
||||
(name &key recipe disable ignore &allow-other-keys) package
|
||||
(name &key recipe disable ignore shadow &allow-other-keys) package
|
||||
(unless ignore
|
||||
(if disable
|
||||
(cl-pushnew name doom-disabled-packages)
|
||||
(when shadow
|
||||
(straight-override-recipe (cons shadow '(:local-repo nil)))
|
||||
(let ((site-load-path (copy-sequence doom--initial-load-path))
|
||||
lib)
|
||||
(while (setq
|
||||
lib (locate-library (concat (symbol-name shadow) ".el")
|
||||
nil site-load-path))
|
||||
(let ((lib (directory-file-name (file-name-directory lib))))
|
||||
(setq site-load-path (delete lib site-load-path)
|
||||
load-path (delete lib load-path))))))
|
||||
(when recipe
|
||||
(straight-override-recipe (cons name recipe)))
|
||||
(straight-register-package name)))))))
|
||||
@@ -327,6 +341,7 @@ installed."
|
||||
If ALL-P, gather packages unconditionally across all modules, including disabled
|
||||
ones."
|
||||
(let ((packages-file (concat doom-packages-file ".el"))
|
||||
doom-disabled-packages
|
||||
doom-packages)
|
||||
(doom--read-packages
|
||||
(doom-path doom-core-dir packages-file) all-p 'noerror)
|
||||
@@ -338,10 +353,12 @@ ones."
|
||||
(doom-files-in doom-modules-dir
|
||||
:depth 2
|
||||
:match "/packages\\.el$"))
|
||||
;; We load the private packages file twice to ensure disabled packages
|
||||
;; are seen ASAP, and a second time to ensure privately overridden
|
||||
;; packages are properly overwritten.
|
||||
(doom--read-packages private-packages nil 'noerror)
|
||||
;; We load the private packages file twice to populate
|
||||
;; `doom-disabled-packages' disabled packages are seen ASAP, and a
|
||||
;; second time to ensure privately overridden packages are properly
|
||||
;; overwritten.
|
||||
(let (doom-packages)
|
||||
(doom--read-packages private-packages nil 'noerror))
|
||||
(cl-loop for key being the hash-keys of doom-modules
|
||||
for path = (doom-module-path (car key) (cdr key) packages-file)
|
||||
for doom--current-module = key
|
||||
@@ -382,7 +399,7 @@ ones."
|
||||
;;; Module package macros
|
||||
|
||||
(cl-defmacro package!
|
||||
(name &rest plist &key built-in recipe ignore _type _pin _disable)
|
||||
(name &rest plist &key built-in recipe ignore _type _pin _disable _shadow)
|
||||
"Declares a package and how to install it (if applicable).
|
||||
|
||||
This macro is declarative and does not load nor install packages. It is used to
|
||||
@@ -419,6 +436,10 @@ Accepts the following properties:
|
||||
inform help commands like `doom/help-packages' that this is a built-in
|
||||
package. If set to 'prefer, the package will not be installed if it is
|
||||
already provided by Emacs.
|
||||
:shadow PACKAGE
|
||||
Informs Doom that this package is shadowing a built-in PACKAGE; the original
|
||||
package will be removed from `load-path' to mitigate conflicts, and this new
|
||||
package will satisfy any dependencies on PACKAGE in the future.
|
||||
|
||||
Returns t if package is successfully registered, and nil if it was disabled
|
||||
elsewhere."
|
||||
@@ -453,7 +474,7 @@ elsewhere."
|
||||
(when-let (recipe (plist-get plist :recipe))
|
||||
(cl-destructuring-bind
|
||||
(&key local-repo _files _flavor
|
||||
_no-build _no-byte-compile _no-autoloads
|
||||
_no-build _no-byte-compile _no-native-compile _no-autoloads
|
||||
_type _repo _host _branch _remote _nonrecursive _fork _depth)
|
||||
recipe
|
||||
;; Expand :local-repo from current directory
|
||||
@@ -469,9 +490,10 @@ elsewhere."
|
||||
(signal 'doom-package-error
|
||||
(cons ,(symbol-name name)
|
||||
(error-message-string e)))))
|
||||
;; This is the only side-effect of this macro!
|
||||
;; These are the only side-effects of this macro!
|
||||
(setf (alist-get name doom-packages) plist)
|
||||
(unless (plist-get plist :disable)
|
||||
(if (plist-get plist :disable)
|
||||
(add-to-list 'doom-disabled-packages name)
|
||||
(with-no-warnings
|
||||
(cons name plist)))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user