File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 27
27
" szg" #'fzf-grep
28
28
" szG" #'fzf-grep-dwim
29
29
" szf" #'fzf-find-file
30
- " szF" #'fzf-find-file-in-dir ))
30
+ " szF" #'fzf-find-file-in-dir )
31
+ :config
32
+ (defun fzf-project (&optional with-preview )
33
+ " Starts an fzf session at the root of the current project."
34
+ (interactive " P" )
35
+ (let ((fzf/args (if with-preview (concat fzf/args " " fzf/args-for-preview) fzf/args))
36
+ (fzf--target-validator (fzf--use-validator (function fzf--validate-filename))))
37
+ (fzf--start (or (ignore-errors (project-root (project-current ))) default-directory) #'fzf--action-find-file )))
38
+
39
+ ; ; fzf.el relays on `projectile-project-root' to guess the project root
40
+ (unless (fboundp 'projectile-project-root )
41
+ (defalias 'projectile-project-root (lambda () (ignore-errors (project-root (project-current )))))))
31
42
32
43
(use-package tldr
33
44
:straight t
You can’t perform that action at this time.
0 commit comments