From f7b13ac0e17d4e47a7c550a023349ab06bf8deae Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Tue, 2 Feb 2021 21:43:06 -0800 Subject: rust_analyzer: Fix the root_dir shell command --- lua/lspconfig/rust_analyzer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/lspconfig/rust_analyzer.lua') diff --git a/lua/lspconfig/rust_analyzer.lua b/lua/lspconfig/rust_analyzer.lua index 6ba704b3..08812819 100644 --- a/lua/lspconfig/rust_analyzer.lua +++ b/lua/lspconfig/rust_analyzer.lua @@ -8,7 +8,7 @@ configs.rust_analyzer = { root_dir = function(fname) local cargo_metadata = vim.fn.system("cargo metadata --format-version 1") local cargo_root = nil - if vim.v.shell_handler == 0 then + if vim.v.shell_error == 0 then cargo_root = vim.fn.json_decode(cargo_metadata)["workspace_root"] end return cargo_root or -- cgit v1.2.3-70-g09d2