aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lspconfig.txt
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-11-28 18:11:56 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-12-08 18:32:42 +0100
commit19626a3a4484de12c3d8c0833bb49ecb3dcd5c76 (patch)
treef6a62d730ce925591d57b83a70a73b3c58029eb6 /doc/lspconfig.txt
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-19626a3a4484de12c3d8c0833bb49ecb3dcd5c76.tar
nvim-lspconfig-19626a3a4484de12c3d8c0833bb49ecb3dcd5c76.tar.gz
nvim-lspconfig-19626a3a4484de12c3d8c0833bb49ecb3dcd5c76.tar.bz2
nvim-lspconfig-19626a3a4484de12c3d8c0833bb49ecb3dcd5c76.tar.lz
nvim-lspconfig-19626a3a4484de12c3d8c0833bb49ecb3dcd5c76.tar.xz
nvim-lspconfig-19626a3a4484de12c3d8c0833bb49ecb3dcd5c76.tar.zst
nvim-lspconfig-19626a3a4484de12c3d8c0833bb49ecb3dcd5c76.zip
refactor: deprecate util.find_node_modules_ancestor
Work on https://github.com/neovim/nvim-lspconfig/issues/2079.
Diffstat (limited to 'doc/lspconfig.txt')
-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