-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-projectile.el
30 lines (25 loc) · 1.11 KB
/
config-projectile.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;;; package --- Summary
;;; Commentary:
;;; Code:
(projectile-mode +1)
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(require 'helm-locate)
;; Copied from helm-locate.el; on OSX we need to use glocate/gupdatedb
;; which is installed via "brew install findutils"
(if (eq system-type 'darwin)
(progn (setq-default helm-locate-command "glocate %s -e -A --regex %s")
(defun helm-projects-find-files (update)
"Find files with locate in `helm-locate-project-list'.
With a prefix arg refresh the database in each project."
(interactive "P")
(helm-locate-set-command)
(cl-assert (and (string-match-p "\\`glocate" helm-locate-command)
(executable-find "gupdatedb"))
nil "Unsupported locate version")
(let ((dbs (helm-locate-find-dbs-in-projects update)))
(if dbs
(helm-locate-with-db dbs)
(user-error "No projects found, please setup `helm-locate-project-list'"))))
))
(helm-projectile-on)
;;; config-projectile ends here