aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lspconfig.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/lspconfig.txt b/doc/lspconfig.txt
index eb476e62..7ae15890 100644
--- a/doc/lspconfig.txt
+++ b/doc/lspconfig.txt
@@ -297,9 +297,14 @@ below returns a function that takes as its argument the current buffer path.
- `util.find_git_ancestor`: a function that locates the first parent directory
containing a `.git` directory. >
root_dir = util.find_git_ancestor
-- `util.find_node_modules_ancestor`: a function that locates the first parent
- directory containing a `node_modules` directory. >
- root_dir = util.find_node_modules_ancestor
+- Locate the first parent dir containing a "node_modules" dir: >lua
+ vim.fs.find('node_modules', { path = root_dir, upward = true })[1]
+<
+ If you have Nvim 0.10 or newer then >lua
+ vim.fs.root(root_dir, "node_modules")
+<
+ can be used instead.
+ - Note: The old `util.find_node_modules_ancestor` API is deprecated and will be removed.
- `util.find_package_json_ancestor`: a function that locates the first parent
directory containing a `package.json`. >
root_dir = util.find_package_json_ancestor