From d651732cecfc77be1b3727512bec0438c22410d1 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Wed, 27 Nov 2024 12:14:13 +0100 Subject: refactor: group deprecated functions at the end This makes it easier to assess how much functionality still needs to be deprecated. --- lua/lspconfig/util.lua | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'lua/lspconfig/util.lua') diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index f89ceb6f..3e859a8f 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -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) @@ -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 @@ -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, @@ -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 -- cgit v1.2.3-70-g09d2