Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs projectile - "you are not in a project" displayed when in directory

I've just created a new folder of javascript files.

The structure is:

.gitignore
README.md
build
node_modules
package.json
src
webpack.config.js

But when I try and find a file with C-c p f, I get a message in the status bar that states

You're not in a project

I have other projects with the same structure that work fine so I don't know what is going on.

like image 645
dagda1 Avatar asked Jan 23 '16 05:01

dagda1


2 Answers

I think your project is indeed considered a project by projectile only if you have a .git folder in it (did you forget to git init?). I'm not seeing one in your case. You can alternatively add a .projectile file instead. Everything in that folder containing the .projectile file and all subfolders will be considered part of the same project.

like image 164
mihai Avatar answered Nov 15 '22 13:11

mihai


Simply open any file in the git project using C-x C-f and then try running command C-c p f.

Opening a file in a git project will make projectile recognize the project.

Just open some file in a version-controlled (e.g. git) or a project (e.g. maven) directory that's recognized by Projectile and you're ready for action.

like image 2
Yogeswaran Avatar answered Nov 15 '22 14:11

Yogeswaran