Skip to content

Allow projectile-find-file to search in parent project #1920

Answered by aburlot
aburlot asked this question in Q&A
Discussion options

You must be logged in to vote

I was not able to make use of project-vc-external-roots-function. Maybe I'm dumb, but I could not find anything relevant to make it work. I ended up coding something myself:

(defvar projectile-linked-projects nil
  "List of locations of linked projects.

Should be set in a .dir-locals.el")

(defun projectile-linked-project-files ()
  "Get a list of all files in current and linked projects."
  (cl-mapcan
   (lambda (project)
     (when (file-exists-p project)
       (mapcar (lambda (file)
                 (expand-file-name file project))
               (projectile-project-files project))))
   (list (projectile-project-root) projectile-linked-projects)))

(defun projectile-find-file-in-link…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aburlot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant