diff options
-rw-r--r-- | .emacs.d/lisp/init-minibuffer.el | 6 | ||||
-rw-r--r-- | .emacs.d/lisp/init-packages.el | 31 |
2 files changed, 13 insertions, 24 deletions
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el index fa9e60f..118a9f5 100644 --- a/.emacs.d/lisp/init-minibuffer.el +++ b/.emacs.d/lisp/init-minibuffer.el @@ -72,9 +72,8 @@ DEFS is a plist associating completion categories to commands." ("M-X" . to-and-fro-minibuffer) ("C-M-S-g" . minibuffer-keyboard-quit))) -;; See init-packages.el for fetching of Vertico Extenions -;; Required extensions must be in the vertico-extensions var (use-package vertico-directory + :ensure nil :after vertico :init (defvar switching-project nil) @@ -118,13 +117,12 @@ DEFS is a plist associating completion categories to commands." 'file #'vertico-directory-delete-word 'project-file #'vertico-directory-delete-word) :config - :load-path vertico-extensions-dir :commands (vertico-directory-enter vertico-directory-delete-word vertico-directory-delete-char) ;; Tidy shadowed file names :hook (rfn-eshadow-update-overlay . vertico-directory-tidy)) (use-package vertico-repeat - :load-path vertico-extensions-dir + :ensure nil :bind ("M-P" . vertico-repeat)) (use-package consult diff --git a/.emacs.d/lisp/init-packages.el b/.emacs.d/lisp/init-packages.el index 70dc5e8..d236bca 100644 --- a/.emacs.d/lisp/init-packages.el +++ b/.emacs.d/lisp/init-packages.el @@ -31,32 +31,23 @@ :config (paradox-enable)) -(defvar vertico-extensions-dir (expand-file-name "site-lisp/vertico-extensions" user-emacs-directory)) -(defvar vertico-extensions '("vertico-directory" "vertico-repeat")) - -(defun fetch-vertico-extensions () - "Download the latest versions of the required vertico extensions into vertico-extensions-dir." - (dolist (extension vertico-extensions) - (let ((ext-file (format "%s.el" extension))) - (url-copy-file - (format "https://raw.githubusercontent.com/minad/vertico/main/extensions/%s" ext-file) - (expand-file-name ext-file vertico-extensions-dir) - t)))) - -(unless (file-directory-p vertico-extensions-dir) - (make-directory vertico-extensions-dir t) - (fetch-vertico-extensions)) - (use-package epl :config + ;; TODO make a copy of the built-in check for system packages work instead (defvar my/system-packages '("vterm")) (defun my/upgrade-packages () (interactive) (epl-refresh) - (when-let ((upgrades (seq-filter (lambda (p) (not (member (epl-package-name p) my/system-packages))) - (mapcar 'epl-upgrade-available (epl-find-upgrades))))) - (epl-upgrade upgrades)) - (fetch-vertico-extensions) + (when-let ((upgrades (seq-filter (lambda (u) + (not (member + (epl-package-name (epl-upgrade-available u)) + my/system-packages))) + (epl-find-upgrades)))) + ;; TODO why doesn't this work? + ;; (epl-upgrade (mapcar 'epl-upgrade-available upgrades) + (dolist (upgrade upgrades) + (epl-package-install (epl-upgrade-available upgrade) 'force) + (epl-package-delete (epl-upgrade-installed upgrade)))) (message "Package upgrade finished."))) (provide 'init-packages) |