From 3cb6c05779459eb5fe9cddbb47675593594f0415 Mon Sep 17 00:00:00 2001 From: Guilherme Soares <48023091+guilhas07@users.noreply.github.com> Date: Sat, 14 Dec 2024 01:06:28 +0100 Subject: docs: how to get package.json parent dir #3506 --- lua/lspconfig/util.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index cc97867f..4bd82b5b 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -378,17 +378,17 @@ function M.path.exists(filename) return stat and stat.type or false end ---- @deprecated use `vim.fs.find('.hg', { path = startpath, upward = true })[1]` instead +--- @deprecated use `vim.fs.dirname(vim.fs.find('.hg', { path = startpath, upward = true })[1])` instead function M.find_mercurial_ancestor(startpath) return vim.fs.dirname(vim.fs.find('.hg', { path = startpath, upward = true })[1]) end ---- @deprecated use `vim.fs.find('node_modules', { path = startpath, upward = true })[1]` instead +--- @deprecated use `vim.fs.dirname(vim.fs.find('node_modules', { path = startpath, upward = true })[1])` instead function M.find_node_modules_ancestor(startpath) return vim.fs.dirname(vim.fs.find('node_modules', { path = startpath, upward = true })[1]) end ---- @deprecated use `vim.fs.find('package.json', { path = startpath, upward = true })[1]` instead +--- @deprecated use `vim.fs.dirname(vim.fs.find('package.json', { path = startpath, upward = true })[1])` instead function M.find_package_json_ancestor(startpath) return vim.fs.dirname(vim.fs.find('package.json', { path = startpath, upward = true })[1]) end -- cgit v1.2.3-70-g09d2