Skip to content

Commit

Permalink
refactor: group deprecated functions at the end
Browse files Browse the repository at this point in the history
This makes it easier to assess how much functionality still needs to be deprecated.
  • Loading branch information
dundargoc committed Nov 27, 2024
1 parent 718f3c7 commit d651732
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions lua/lspconfig/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ M.path = (function()
return path:gsub('([%[%]%?%*])', '\\%1')
end

--- @deprecated use `vim.fs.normalize` instead
local function sanitize(path)
return vim.fs.normalize(path)
end

--- @param filename string
--- @return string|false
local function exists(filename)
Expand Down Expand Up @@ -146,11 +141,6 @@ M.path = (function()
end
end

---@deprecated use `vim.fs.dirname` instead
local function dirname(path)
return vim.fs.dirname(path)
end

local function path_join(...)
return table.concat(M.tbl_flatten { ... }, '/')
end
Expand Down Expand Up @@ -214,9 +204,7 @@ M.path = (function()
is_file = is_file,
is_absolute = is_absolute,
exists = exists,
dirname = dirname,
join = path_join,
sanitize = sanitize,
traverse_parents = traverse_parents,
iterate_parents = iterate_parents,
is_descendant = is_descendant,
Expand Down Expand Up @@ -407,4 +395,10 @@ function M.strip_archive_subpath(path)
return path
end

---@deprecated use `vim.fs.dirname` instead
M.dirname = vim.fs.dirname

--- @deprecated use `vim.fs.normalize` instead
M.sanitize = vim.fs.normalize

return M

0 comments on commit d651732

Please sign in to comment.