aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/configs/rust_analyzer.lua
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2024-11-26 22:42:28 +0100
committerGitHub <noreply@github.com>2024-11-26 13:42:28 -0800
commit830ec3893eeb2b21d182864b56931ca6d23d3e29 (patch)
treebddf3b5be5c9886642dcaa8cd78569e5eb4cc28f /lua/lspconfig/configs/rust_analyzer.lua
parentci: check for deprecated util functions #3462 (diff)
downloadnvim-lspconfig-830ec3893eeb2b21d182864b56931ca6d23d3e29.tar
nvim-lspconfig-830ec3893eeb2b21d182864b56931ca6d23d3e29.tar.gz
nvim-lspconfig-830ec3893eeb2b21d182864b56931ca6d23d3e29.tar.bz2
nvim-lspconfig-830ec3893eeb2b21d182864b56931ca6d23d3e29.tar.lz
nvim-lspconfig-830ec3893eeb2b21d182864b56931ca6d23d3e29.tar.xz
nvim-lspconfig-830ec3893eeb2b21d182864b56931ca6d23d3e29.tar.zst
nvim-lspconfig-830ec3893eeb2b21d182864b56931ca6d23d3e29.zip
refactor: remove internal implementation of `util.path.sanitize` #3464
Return value from `vim.fs.normalize` instead.
Diffstat (limited to 'lua/lspconfig/configs/rust_analyzer.lua')
-rw-r--r--lua/lspconfig/configs/rust_analyzer.lua4
1 files changed, 2 insertions, 2 deletions
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