From 830ec3893eeb2b21d182864b56931ca6d23d3e29 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 26 Nov 2024 22:42:28 +0100 Subject: refactor: remove internal implementation of `util.path.sanitize` #3464 Return value from `vim.fs.normalize` instead. --- lua/lspconfig/configs/rust_analyzer.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/lspconfig/configs/rust_analyzer.lua') diff --git a/lua/lspconfig/configs/rust_analyzer.lua b/lua/lspconfig/configs/rust_analyzer.lua index a8f11208..8bcde6c9 100644 --- a/lua/lspconfig/configs/rust_analyzer.lua +++ b/lua/lspconfig/configs/rust_analyzer.lua @@ -16,7 +16,7 @@ local function reload_workspace(bufnr) end local function is_library(fname) - local user_home = util.path.sanitize(vim.env.HOME) + local user_home = vim.fs.normalize(vim.env.HOME) local cargo_home = os.getenv 'CARGO_HOME' or util.path.join(user_home, '.cargo') local registry = util.path.join(cargo_home, 'registry', 'src') local git_registry = util.path.join(cargo_home, 'git', 'checkouts') @@ -62,7 +62,7 @@ return { if result and result[1] then result = vim.json.decode(table.concat(result, '')) if result['workspace_root'] then - cargo_workspace_root = util.path.sanitize(result['workspace_root']) + cargo_workspace_root = vim.fs.normalize(result['workspace_root']) end end end -- cgit v1.2.3-70-g09d2