Skip to content

Commit

Permalink
[Docs] Mention projectile-root-marked
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsov committed Nov 14, 2022
1 parent 752ef1c commit 7d414ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/modules/ROOT/pages/projects.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ Let's take a closer look at `projectile-project-root-functions`:
----
(defcustom projectile-project-root-functions
'(projectile-root-local
projectile-root-marked
projectile-root-bottom-up
projectile-root-top-down
projectile-root-top-down-recurring)
Expand All @@ -563,6 +564,8 @@ precedence with respect to project detection. Let's examine the defaults:

* `projectile-root-local` looks for project path set via the buffer-local variable `projectile-project-root`. Typically you'd set this variable via `.dir-locals.el` and it will take precedence over everything else.

* `projectile-root-marked` looks for `.projectile` (or whatever you've set as the value of `projectile-dirconfig-file`). The idea is that normally if you have a `.projectile` file you'd like it to override the normal project root discovery logic.

* `projectile-root-bottom-up` will start looking for a project marker file/folder(e.g. `.projectile`, `.hg`, `.git`) from the current folder (a.k.a. `default-directory` in Emacs lingo) up the directory tree. It will return the first match it discovers. The assumption is pretty simple - the root marker appear only once, at the root folder of a project. If a root marker appear in several nested folders (e.g. you've got nested git projects), the bottom-most (closest to the current dir) match has precedence. You can customize the root markers recognized by this function via `projectile-project-root-files-bottom-up`

* `projectile-root-top-down` is similar, but it will return the top-most (farthest from the current directory) match. It's configurable via `projectile-project-root-files` and all project manifest markers like `pom.xml`, `Gemfile`, `project.clj`, etc go there.
Expand Down

0 comments on commit 7d414ea

Please sign in to comment.