use-package
use-package copied to clipboard
Variable assignment doesn't always work as expected
It was determined in https://github.com/abo-abo/swiper/issues/2267 that use-package causes ivy-initial-inputs-alist to not be set properly, so code like
(use-package ivy
:ensure t
:defer nil
:custom
(ivy-initial-inputs-alist nil)
:init
(ivy-mode))
(use-package counsel
:after ivy
:ensure t
:defer nil
:bind (("M-x" . counsel-M-x)
("C-x C-f" . counsel-find-file))
:custom
;; seriously, stop
(ivy-initial-inputs-alist nil))
doesn't work as expected, despite the attempt to defer loading. It's probably caused by lines like https://github.com/abo-abo/swiper/blob/d2052bab4eecebab84e75b8a10b66f66a8574425/counsel.el#L3920.
It doesn't use-package issue, it is on swiper, I think. The line disappears now, your issue still exist?
@berquist I was just having a similar issue with ivy-re-builders-alist. For whatever reason, moving the assignment to :config (with the needed setq) seems to have solved the issue. It's as if the variables assigned values via :custom are getting overwritten by the defaults, but not those assigned via :config. Since I still don't understand the difference between how :custom and :config are supposed to differ, I don't know whether this is a use-package issue or a swiper one.