From f1405c1ea5d7a1051a8ced3110d7cf3b8524041b Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 21 Dec 2024 16:16:04 +0100 Subject: refactor: deprecate util.path.path_separator Work on https://github.com/neovim/nvim-lspconfig/issues/2079. --- lua/lspconfig/util.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua/lspconfig/util.lua') diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index c1ad0128..7a47d722 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -158,13 +158,10 @@ M.path = (function() return dir == root end - local path_separator = iswin and ';' or ':' - return { traverse_parents = traverse_parents, iterate_parents = iterate_parents, is_descendant = is_descendant, - path_separator = path_separator, } end)() @@ -363,6 +360,9 @@ function M.path.join(...) return table.concat({ ... }, '/') end +--- @deprecated use `vim.fn.has('win32') == 1 and ';' or ':'` instead +M.path.path_separator = vim.fn.has('win32') == 1 and ';' or ':' + --- @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]) -- cgit v1.2.3-70-g09d2