I would like Projectile Mode to recognize other projects besides the default ones (GIT, Maven, etc.) The README.md
describes how to customize project root files, however it doesn't explain how Projectile learns what files belong to a project once it has found a project root file. Therefore, what are the steps needed to configure a custom project root file?

- 1,448
- 11
- 17
1 Answers
Assuming you have projectile-indexing-method
set to 'alien' (the
default except for Windows), if the VCS isn't recognized, projectile
will call projectile-generic-command
, which is "find . -type f
-print0" by default. If you want to take a closer look,
projectile-get-ext-command
is the function that decides to what to
call.
I don't think there's any easy way to add a custom project type, but for an example of what you'd need to add, you can follow this commit that added support for fossil.
It's probably wrong for me to use the term 'project type' above since
projectile has a projectile-project-type
that determines a project
type that is unrelated to the VCS used (django, python, rails,...). This
information is only used for setting the test and compilation commands.
As described above, it is the VCS (or lack of one) that determines how
project files are collected.

- 7,024
- 27
- 22
projectile-get-ext-command
is meant for VCS files, albeit I think that it could be bent to other uses. Do you have any idea about how to do a similar thing with the kind of files listed inprojectile-project-root-files
? – Eleno Dec 02 '14 at 00:13projectile-indexing-method
is 'alien'),projectile-generic-command
will be used, which by default finds all files. For VCS projects, projectile will useprojectile-VCS-command
. This doesn't necessarily mean that the file is under source control. For example,projectile-git-command
includes untracked files. – Kyle Meyer Dec 02 '14 at 02:09.projectile
there. You can exclude files/directories you don't want by specifying it in.projectile
file. See Ignoring Files. – Tu Do Dec 02 '14 at 04:48.projectile
). I know how to parse that special file, but I don't know how to pass the file list to Projectile. – Eleno Dec 02 '14 at 10:28projectile-get-ext-command
misleads, because it talks explicitly of VCS, but in reality the function is generic. – Eleno Dec 02 '14 at 10:29