aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2021-01-22 15:57:13 -0500
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2021-01-22 15:57:13 -0500
commiteec43aaccb3222c838091ac4eb8f8780d921d4cc (patch)
tree3cd59fdbf211b02dfa71ca03a3adb9cb7a3d4260 /docs
parentc5aa8f8dec9611828b6972bc1a72cc8571eab36a (diff)
`io.get_project_root()` accepts an optional flag for returning a submodule root.
This is for systems like git that have '.git' files (not directories) for submodules under a parent '.git' directory.
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/api.md b/docs/api.md
index 7d225a0d..a0a9b2b3 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -4376,7 +4376,7 @@ See also:
* [`buffer.close`](#buffer.close)
<a id="io.get_project_root"></a>
-#### `io.get_project_root`(*path*)
+#### `io.get_project_root`(*path, submodule*)
Returns the root directory of the project that contains filesystem path
*path*.
@@ -4387,7 +4387,10 @@ Parameters:
* *`path`*: Optional filesystem path to a project or a file contained within
a project. The default value is the buffer's filename or the current
- working directory.
+ working directory. This parameter may be omitted.
+* *`submodule`*: Optional flag that indicates whether or not to return the
+ root of the current submodule (if applicable). The default value is
+ `false`.
Return: