Move use-extension macro to init-packages

This commit is contained in:
David Morgan 2022-10-17 16:07:30 +01:00
parent 6efcee4e88
commit a020f453cc
Signed by: djm
GPG Key ID: C171251002C200F2
2 changed files with 11 additions and 10 deletions

View File

@ -141,16 +141,6 @@ no words in between, beginning with the first word."
([backtab] . corfu-previous))
:hook (emacs-startup . global-corfu-mode))
(defmacro use-extension (pkg name &rest args)
"Like `use-package', but for a package extension.
`PKG' is the name of the package, `NAME' and `ARGS' are as with `use-package'"
(declare (indent defun))
`(use-package ,name
:straight nil
:after pkg
:demand t
,@args))
(use-extension corfu corfu-indexed
:config (corfu-indexed-mode 1))

View File

@ -39,6 +39,17 @@
(use-feature straight-x
:commands (straight-x-fetch-all))
;; useful for corfu and vertico extenions
(defmacro use-extension (pkg name &rest args)
"Like `use-package', but for a package extension.
`PKG' is the name of the package, `NAME' and `ARGS' are as with `use-package'"
(declare (indent defun))
`(use-package ,name
:straight nil
:after pkg
:demand t
,@args))
(use-package diminish)
(defun run-straight-lock-file-function (func)