0

My code base consists of a "mono-repo". A single large repository containing a flat structure of projects.

Top
  Project1
  Project2
  Project3
  Library
  Library

I've been using Projectile to navigate this so far, but I'm starting to get to the point where I want to be able to search within a given library or project. I have a function that will return the root of a library or project.

How can I use projectile-find-file, or something like it, within one of these projects?

Work so far

I found the following command (helm-find-1 (my-mono-find-root)) that does something close to what I want. I'd quite like it to ignore some files tho.

3
  • See reddit.com/r/emacs/comments/920psp/….
    – omajid
    Commented Jun 27, 2020 at 16:11
  • The question is a bit unclear. Are you looking for faster navigation or faster location of items below Top? Do those projects need to be loaded, such as activating a Python virtual environment? Commented Jul 3, 2020 at 1:03
  • @LoremIpsum Thanks for the reply Lorem, I want to be able to search files within Project1. I want a separate command to search Top.
    – Att Righ
    Commented Jul 3, 2020 at 9:17

1 Answer 1

1
+50

To look within a particular project, I often use ag. It is a front end for The Silver Searcher which allows you to recursively search a directory for a regexp in a file or filename. The ag package presents a nice list of matches with links to their source. Similar packages exist for grep ((emacs) Grep Searching or via C-h i d m emacs <RET> m Grep Searching) and ripgrep (rg.el).

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.