diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index f8255a9c..b7af6b72 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -1391,10 +1391,22 @@ window is active in the perspective." (progn (use-package persp-projectile :ensure t - :commands projectile-persp-switch-project) - (use-package helm-projectile + :commands projectile-persp-switch-project))) + +(use-package helm-projectile :ensure t - :commands (helm-projectile-on)))) + :commands (helm-projectile-on) + :config + (progn + (helm-delete-action-from-source "Search in Project" helm-source-projectile-projects) + (defun imalison:switch-to-project-and-search (dir) + (let ((default-directory dir) + (projectile-require-project-root nil) + (helm-action-buffer "this-buffer-should-not-exist")) + (helm-projectile-ag))) + (helm-add-action-to-source "Search in Project" + 'imalison:switch-to-project-and-search + helm-source-projectile-projects))) (use-package smex :ensure t