Custom .projectile in sub-dir does not work
Expected behavior
I have the following custom project type.
(projectile-register-project-type
'custom (lambda (project-root) (and project-root (string-match "my-subproject/src/foo" project-root)))
:project-file ".projectile"
:test-suffix "_test"
The .projectile file lives in the foo subdir of src. I'd like to have custom has detected project type (and use the _test suffix).
Actual behavior
The project type is generic
Steps to reproduce the problem
Create a git repo with src/foo/.projectile in it. Register the above project.
Environment & Version information
Projectile version information
Projectile version: 2.8.0
I did a bit of debugging and it seems the following happens:
(if (functionp marker) ;; *correctly evaluates to true*
;; the below call with dir=nil returns falsey though
(and (funcall marker dir) project-type)
(and (projectile-verify-files marker dir) project-type))
Should my marker function return true if the input dir is nil?
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs. Thank you for your contribution and understanding!
I'm afraid the detection of .projectile to be a topmost level will take precedence over anything you add in project specification. This can be changed, but it's a bit painful, so I'd rather just use a different project marker in your case.