Hacker News new | ask | show | jobs
by dbalatero 921 days ago
I tend to not like this extra step of managing submodules, but to each their own. Often enough I'm looking at many packages at once. I guess you have to globally gitignore the projectile file too to avoid committing them everywhere?
1 comments

> I guess you have to globally gitignore the projectile file too to avoid committing them everywhere?

Indeed, in my global git ignore, same with other workflow-specific stuff that nobody else at $WORK uses

I considered projectile but then found that the built in project-find-file is enough for my puny webdev projects - they all have a .git by default and once in the dir, looking for files works it seems without any setup or config files. Does projectile have something I might like to have?
I don't know if there's a way to indicate a project with the built-in project.el without a VC root. The other feature i use regularly that I don't think exists in project.el is projectile-toggle-between-implementation-and-test, which does exactly what it sounds like. You can configure it by build tool and give it path regexes to substitute to specify how to find the corresponding Spec for a file.

I actually use a mix of both. Project.el being built in means it properly leverages the built-in completion stuff, which has a level of awareness for the types of things I search and gives appropriate icons and context information (see all-the-icons-completion[1] for details). I fibbed a little bit about my workflow - to switch projects and find a file I use this:

  (defun project-find-file-from-projectile-project ()
    (interactive)
    (project-switch-project (completing-read "From which project?" projectile-known-projects)))
[1] https://github.com/iyefrat/all-the-icons-completion
Alternatively if the monorepo has a way to denote when you're in a new package (package.json, etc) you could key off that too?
I use project.el instead of projectile but yeah that is exactly what I do. It is only a couple of lines.

https://github.com/PuercoPop/.emacs.d/blob/9d0b99d332d619fe3...