Skip to content

Commit

Permalink
refactor: deprecate util.path.path_separator
Browse files Browse the repository at this point in the history
Work on neovim#2079.
  • Loading branch information
dundargoc committed Dec 21, 2024
1 parent 5f35efe commit eb702be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/lspconfig/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)()

Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit eb702be

Please sign in to comment.