pailanderCO · 2022-02-18 19:18
I'm using `vertico` and wanted to use `vertico-mouse-mode` (in `vertico-mouse.el`) to allow for mouse support. I couldn't find information on how to load the extension (included in `vertico/extensions/`), but I managed the following:
(use-package vertico
:straight t
:custom
(vertico-resize nil)
(vertico-cycle t)
:init
(vertico-mode)
:config
(add-to-list 'load-path "~/.emacs.d/straight/repos/vertico/extensions")
(require 'vertico-mouse)
(vertico-mouse-mode)
)
Note that `vertico-mouse-mode` isn't available in `vertico.el`, but requires `vertico-mouse.el`.
I'm using `straight.el` (btw), so I don't like at all the `require` statement here. Is there any other way I could load the package?
alternateved · 2022-02-18 19:30
Try with this:
(use-package vertico
:straight (:files (:defaults "extensions/*"))
:init
(vertico-mode))
pailanderCO · 2022-02-18 19:37
Thanks! That did it!
andreyorst · 2022-02-18 20:07
I did it like that:
(use-package vertico
:bind ( :map vertico-map
("M-RET" . vertico-exit-input))
:init
(vertico-mode))
(use-package vertico-directory
:after vertico
:straight nil
:load-path "straight/repos/vertico/extensions/"
:bind ( :map vertico-map
("RET" . vertico-directory-enter)
("DEL" . vertico-directory-delete-char)
("M-DEL" . vertico-directory-delete-word))
:hook (rfn-eshadow-update-overlay . vertico-directory-tidy))
pailanderCO · 2022-02-18 22:35
That's another good way to do it. Thanks!
zoliky · 2022-08-02 23:33
What does this line do? > `:hook (rfn-eshadow-update-overlay . vertico-directory-tidy))`
andreyorst · 2022-08-14 10:53
I don't remember now, but if I'm not mistaken it was added because vertico suggests this in their readme