Problems setting up Helm-Projectile for emacs

1k Views Asked by At

I'm new to emacs, about a week and a half now. I'm on a mac, high sierra, 10.13.2.

I'm using use-package.

I've been trying to set up helm-projectile, using a basic config such as this link, but I can't get helm-projectile-find-file to work (I'm a previous-vim user and wanted a ctrl-p like setup).

Here is a screenshot of the error I'm getting when running helm-projectile-find-file

To be clear:

  • projectile-find-file works fine
  • helm-projectile-find-file-in-known-projects works fine
  • helm-projectile-switch-project works fine
  • etc.

It's just helm-projectile-find-file that doesn't work. I'm so stumped as to why and I've been trying to solve this all weekend and so any help would be appreciated.

Here's the relevant settings I'm using in my .emacs config file

;; Projectile
(use-package projectile
:ensure t
:defer t
:config
(projectile-global-mode))


;; Helm
(use-package helm
:ensure t
:config
(helm-mode 1)
(setq helm-autoresize-mode t)
(global-set-key (kbd "C-x C-f") #'helm-find-files)
(global-set-key (kbd "M-x") #'helm-M-x)
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebind tab to do persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z")  'helm-select-action) ; list actions using C-z
)


;; Helm Projectile
(use-package helm-projectile
:bind (("C-S-P" . helm-projectile-switch-project))
       :map evil-normal-state-map
       ("C-p" . helm-projectile-find-file))
:ensure t
)

Here is a link for my full .emacs config file.

1

There are 1 best solutions below

0
Nathan On

adding (require 'subr-x) to my .emacs file worked