fix(vertico): update +vertico/consult-fd to new builder format
This commit is contained in:
parent
c467b1c9d3
commit
b13c058429
1 changed files with 12 additions and 11 deletions
|
@ -208,16 +208,17 @@ targets."
|
||||||
(not (string-suffix-p "-argument" (cdr binding))))))))
|
(not (string-suffix-p "-argument" (cdr binding))))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +vertico--consult--fd-builder (input)
|
(defun +vertico--consult--fd-make-builder ()
|
||||||
(pcase-let* ((cmd (split-string-and-unquote +vertico-consult-fd-args))
|
(let ((cmd (split-string-and-unquote +vertico-consult-fd-args)))
|
||||||
(`(,arg . ,opts) (consult--command-split input))
|
(lambda (input)
|
||||||
(`(,re . ,hl) (funcall consult--regexp-compiler
|
(pcase-let* ((`(,arg . ,opts) (consult--command-split input))
|
||||||
arg 'extended t)))
|
(`(,re . ,hl) (funcall consult--regexp-compiler
|
||||||
(when re
|
arg 'extended t)))
|
||||||
(list :command (append cmd
|
(when re
|
||||||
(list (consult--join-regexps re 'extended))
|
(cons (append cmd
|
||||||
opts)
|
(list (consult--join-regexps re 'extended))
|
||||||
:highlight hl))))
|
opts)
|
||||||
|
hl))))))
|
||||||
|
|
||||||
(autoload #'consult--directory-prompt "consult")
|
(autoload #'consult--directory-prompt "consult")
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
@ -226,7 +227,7 @@ targets."
|
||||||
(if doom-projectile-fd-binary
|
(if doom-projectile-fd-binary
|
||||||
(let* ((prompt-dir (consult--directory-prompt "Fd" dir))
|
(let* ((prompt-dir (consult--directory-prompt "Fd" dir))
|
||||||
(default-directory (cdr prompt-dir)))
|
(default-directory (cdr prompt-dir)))
|
||||||
(find-file (consult--find (car prompt-dir) #'+vertico--consult--fd-builder initial)))
|
(find-file (consult--find (car prompt-dir) (+vertico--consult--fd-make-builder) initial)))
|
||||||
(consult-find dir initial)))
|
(consult-find dir initial)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue