spacemacs/layers/+tools/fasd/funcs.el
Daniel Nicolai dfd5532429
Add search-from ivy action to fasd layer
If I had known about browsing history with `C-r` before [I modified the fasd
package to implement full ivy
support](c4c04873fd),
then I guess I would not have modified it. Anyway, now that "full Ivy support"
has been merged into the fasd package, I could add this 'search-from' action
command to `fasd-find-file` which triggers Spacemacs 'search-auto'. Because fasd
only finds dirs that have been visited before, it probably does not add much to
the `C-r` functionality, but maybe it does (you decide?). Anyway, I hope you can
help decide if this is useful for merging.
2021-02-07 22:31:05 +01:00

11 lines
355 B
EmacsLisp

(with-eval-after-load 'fasd
(defun ivy-search-from-action (x)
(if (file-directory-p x)
(spacemacs/counsel-search dotspacemacs-search-tools nil x)
(message "Selected item is not a directory path")))
(ivy-set-actions
'fasd-find-file
'(("o" fasd-find-file-action "find-file")
("s" ivy-search-from-action "search-from"))))