aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/util.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/util.lua')
-rw-r--r--lua/lspconfig/util.lua14
1 files changed, 5 insertions, 9 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index f8ffe57e..06718eb2 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -247,15 +247,6 @@ function M.find_git_ancestor(startpath)
end)
end
-function M.find_mercurial_ancestor(startpath)
- return M.search_ancestors(startpath, function(path)
- -- Support Mercurial directories
- if vim.fn.isdirectory(M.path.join(path, '.hg')) == 1 then
- return path
- end
- end)
-end
-
function M.find_node_modules_ancestor(startpath)
return M.search_ancestors(startpath, function(path)
if vim.fn.isdirectory(M.path.join(path, 'node_modules')) == 1 then
@@ -405,4 +396,9 @@ function M.path.exists(filename)
return stat and stat.type or false
end
+--- @deprecated use `vim.fs.find('.hg', { path = startpath, upward = true })` instead
+function M.find_mercurial_ancestor(startpath)
+ return vim.fs.find('.hg', { path = startpath, upward = true })
+end
+
return M