From df0caac8e36a345ef5c88b91afbd41d357539159 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 24 Nov 2020 12:27:39 +0200 Subject: [Docs] Expand the section on projectile-require-project-root --- doc/modules/ROOT/pages/configuration.adoc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/configuration.adoc b/doc/modules/ROOT/pages/configuration.adoc index 93b2055..0a30b3a 100644 --- a/doc/modules/ROOT/pages/configuration.adoc +++ b/doc/modules/ROOT/pages/configuration.adoc @@ -188,7 +188,17 @@ needed but possible: (setq projectile-file-exists-local-cache-expire (* 5 60)) ---- -== Using Projectile everywhere +== Using Projectile Commands Outside of Projects Directories + +Normally, you'd be using Projectile's commands from within some project directory. +If, however, you invoke a command outside of a project, by default you'll be prompted +for a project to switch to. That behavior is controlled by `projectile-require-project-root`. +You can make Projectile simply raise an error outside of Project folders like this: + +[source,elisp] +---- +(setq projectile-require-project-root t) +---- If you want Projectile to be usable in every directory (even without the presence of project file): @@ -197,6 +207,9 @@ If you want Projectile to be usable in every directory (even without the presenc (setq projectile-require-project-root nil) ---- +With this setting if you invoke Projectile outside of a project, the current directory will be +considered by Projectile the project root. + TIP: This might not be a great idea if you start Projectile in your home folder for instance. :-) == Switching projects -- cgit v1.0