aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/util.lua
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-11-27 12:14:13 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-11-27 12:19:32 +0100
commitd651732cecfc77be1b3727512bec0438c22410d1 (patch)
treec54774ba5d8781894935e25190a9a1fb61990657 /lua/lspconfig/util.lua
parentci: forbid using util.path.sanitize (diff)
downloadnvim-lspconfig-d651732cecfc77be1b3727512bec0438c22410d1.tar
nvim-lspconfig-d651732cecfc77be1b3727512bec0438c22410d1.tar.gz
nvim-lspconfig-d651732cecfc77be1b3727512bec0438c22410d1.tar.bz2
nvim-lspconfig-d651732cecfc77be1b3727512bec0438c22410d1.tar.lz
nvim-lspconfig-d651732cecfc77be1b3727512bec0438c22410d1.tar.xz
nvim-lspconfig-d651732cecfc77be1b3727512bec0438c22410d1.tar.zst
nvim-lspconfig-d651732cecfc77be1b3727512bec0438c22410d1.zip
refactor: group deprecated functions at the end
This makes it easier to assess how much functionality still needs to be deprecated.
Diffstat (limited to 'lua/lspconfig/util.lua')
-rw-r--r--lua/lspconfig/util.lua18
1 files changed, 6 insertions, 12 deletions
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