diff options
| author | dundargoc <gocdundar@gmail.com> | 2024-12-21 14:08:47 +0100 |
|---|---|---|
| committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-12-21 16:10:35 +0100 |
| commit | 45c5095097702e8316f9409b39b2721db8534db2 (patch) | |
| tree | 6004d82c4560500b2ac384deab84d1ef778dd5dc /lua/lspconfig/configs/rust_analyzer.lua | |
| parent | refactor: fix luals warnings (diff) | |
| download | nvim-lspconfig-45c5095097702e8316f9409b39b2721db8534db2.tar nvim-lspconfig-45c5095097702e8316f9409b39b2721db8534db2.tar.gz nvim-lspconfig-45c5095097702e8316f9409b39b2721db8534db2.tar.bz2 nvim-lspconfig-45c5095097702e8316f9409b39b2721db8534db2.tar.lz nvim-lspconfig-45c5095097702e8316f9409b39b2721db8534db2.tar.xz nvim-lspconfig-45c5095097702e8316f9409b39b2721db8534db2.tar.zst nvim-lspconfig-45c5095097702e8316f9409b39b2721db8534db2.zip | |
refactor: deprecate util.path.join
Work on https://github.com/neovim/nvim-lspconfig/issues/2079.
Diffstat (limited to 'lua/lspconfig/configs/rust_analyzer.lua')
| -rw-r--r-- | lua/lspconfig/configs/rust_analyzer.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/lspconfig/configs/rust_analyzer.lua b/lua/lspconfig/configs/rust_analyzer.lua index fbea04e4..5f592d40 100644 --- a/lua/lspconfig/configs/rust_analyzer.lua +++ b/lua/lspconfig/configs/rust_analyzer.lua @@ -17,12 +17,12 @@ end local function is_library(fname) 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') + local cargo_home = os.getenv 'CARGO_HOME' or user_home .. '/.cargo' + local registry = cargo_home .. '/registry/src' + local git_registry = cargo_home .. '/git/checkouts' - local rustup_home = os.getenv 'RUSTUP_HOME' or util.path.join(user_home, '.rustup') - local toolchains = util.path.join(rustup_home, 'toolchains') + local rustup_home = os.getenv 'RUSTUP_HOME' or user_home .. '/.rustup' + local toolchains = rustup_home .. '/toolchains' for _, item in ipairs { toolchains, registry, git_registry } do if util.path.is_descendant(item, fname) then @@ -54,7 +54,7 @@ return { '--format-version', '1', '--manifest-path', - util.path.join(cargo_crate_dir, 'Cargo.toml'), + cargo_crate_dir .. '/Cargo.toml', } local result = async.run_command(cmd) |
