Skip to content

Commit

Permalink
Merge pull request #321 from ranulf/helm-projectile1
Browse files Browse the repository at this point in the history
Introduce variable helm-projectile-sources-list.
  • Loading branch information
bbatsov committed Apr 18, 2014
2 parents a4c6248 + 9e342a7 commit 6954565
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions helm-projectile.el
Expand Up @@ -46,6 +46,12 @@
(require 'helm-files)
(require 'cl-lib)

(defgroup helm-projectile nil
"Helm support for projectile."
:prefix "helm-projectile-"
:group 'projectile
:link `(url-link :tag "helm-projectile homepage" "https://github.com/bbatsov/projectile"))

(defvar helm-projectile-current-project-root)

(defun helm-projectile-coerce-file (candidate)
Expand Down Expand Up @@ -117,14 +123,19 @@
(action . (lambda (file) (find-file file))))
"Helm source definition.")

(defcustom helm-projectile-sources-list
'(helm-source-projectile-files-list
helm-source-projectile-buffers-list
helm-source-projectile-recentf-list)
"Default sources for `helm-projectile'."
:group 'helm-projectile)

;;;###autoload
(defun helm-projectile ()
"Use projectile with Helm instead of ido."
(interactive)
(let ((helm-ff-transformer-show-only-basename nil))
(helm :sources '(helm-source-projectile-files-list
helm-source-projectile-buffers-list
helm-source-projectile-recentf-list)
(helm :sources helm-projectile-sources-list
:buffer "*helm projectile*"
:prompt (projectile-prepend-project-name "pattern: "))))

Expand Down

0 comments on commit 6954565

Please sign in to comment.