From 90ea0355f759d9e5aa584e64870a9a0591a838ab Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 12 Aug 2021 14:21:42 -0500 Subject: Break lambda out into function .. and remove vuiet. oop --- init.el | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/init.el b/init.el index 2c1fb85..0883a38 100644 --- a/init.el +++ b/init.el @@ -1469,24 +1469,17 @@ if ripgrep is installed, otherwise `consult-grep'." (:also-load vertico-mouse) (vertico-mouse-mode +1) - ;; Prefix the current candidate with ": ". From Vertico wiki. - (advice-add #'vertico--format-candidate :around - (lambda (orig cand prefix suffix index _start) - (setq cand (funcall orig cand prefix suffix index _start)) - (concat - (if (= vertico--index index) - (propertize ": " 'face 'vertico-current) - " ") - cand)))) - -(setup (:straight vuiet) - (:needs "youtube-dl" - "mpv") + ;; Prefix the current candidate with "> ". From Vertico wiki. + (defun vertico-format@add-arrow (orig cand prefix suffix index _start) + (setq cand (funcall orig cand prefix suffix index _start)) + (concat + (if (= vertico--index index) + (propertize "> " 'face 'vertico-current) + " ") + cand)) + (advice-add #'vertico--format-candidate :around #'vertico-format@add-arrow)) + - ;; lastfm.el is required too, and needs some setup: - ;; https://github.com/mihaiolteanu/lastfm.el - (setup (:straight lastfm) - (require 'lastfm))) (setup (:straight web-mode) (:option css-level-offset 2 -- cgit 1.4.1-21-gabe81