3

I have a big version-controlled directory hosting a lot of half-independent bodies of work. I want to consider them all as projects for projectile.

So I added an empty .projectile file in each of them, with the idea that projectile would pick that up instead of the .git above.

So the situation is like this

~/main-directory/
 -> .git
 -> project1/
     -> .projectile
     -> file1
     -> file2
 -> project2/
     -> .projectile
     -> file1
     -> file2

But if I open ~/main-directory/project2/file1 and call projectile-add-known-project, it considers the whole main-directory as one project. In particular, completion matches files with the same name in all subdirectories...

I have tried (setq projectile-project-root-files-bottom-up (delete ".projectile" projectile-project-root-files-bottom-up)), but it did not help.

Is there a simple way of telling projectile that the main-directory is not to be considered a project?

1

The name is not explanatory, but the function projectile-remove-current-project-from-known-projects works fine: simply navigate to the main-directory and call the command. Visited subprojects will still appear in the project list.

More information: https://github.com/bbatsov/projectile/issues/315

One can also customize or set the variable projectile-globally-ignored-directories or projectile-ignored-projects to make the directory durably ignored. There must be a difference between the two, but I don't know it.

| 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.