0

I want to enable counsel-projectile-mode by default.

I have added (counsel-projectile-mode) to .emacs file as per project's usage guide but it doesn't work; meaning projectile still uses ido for finding files and such) ...

But after the Emacs is open if i M-x counsel-projectile-mode twice to disable and re-enable it, from within emacs, it will start working. (meaning projectile will use counsel for finding files, instead of using ido)

Any idea what's wrong?

This is my .emacs file.

1

I'm not sure why you have both (counsel-projectile-mode) and (counsel-projectile-mode nil) in your .emacs file. Have you tried simply adding a hook to start (counsel-projectile-mode) when loading projectile? Delete (or comment out) the lines you currently have for counsel-projectile-mode and try this:

(add-hook 'projectile-mode-hook 'counsel-projectile-mode)
| improve this answer | |
  • I added the one with nil for testing, after the first one wouldn't work ... (it didn't work with nil either) tried the hook but apparently it gets into some sort of loop ... and doesn't work either ... – Microsoft Linux TM Jan 18 at 18:49
  • I solved the problem, but not sure what's the deal, gonna make a bug report – Microsoft Linux TM Jan 18 at 18:53
0

Adding this to the .emacs file, solves the problem:

(add-hook 'emacs-startup-hook 'counsel-projectile-mode)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.