From e7f76df1f7bd03b7728e48b1c72252ace04c797f Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Mon, 25 Nov 2024 21:02:54 +0100 Subject: [PATCH] Update lua/rustaceanvim/lsp/init.lua --- lua/rustaceanvim/lsp/init.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/rustaceanvim/lsp/init.lua b/lua/rustaceanvim/lsp/init.lua index 38800592..1a60549a 100644 --- a/lua/rustaceanvim/lsp/init.lua +++ b/lua/rustaceanvim/lsp/init.lua @@ -311,10 +311,8 @@ M.set_target_arch = function(bufnr, target) restart(bufnr, { exclude_rustc_target = target }, function(client) rustc.with_rustc_target_architectures(function(rustc_targets) if rustc_targets[target] then - -- NOTE: It is not guaranteed that the 'cargo' subkey exists (atleast rustaceanvim does - -- not configure it by default). local ra = client.config.settings['rust-analyzer'] - ra.cargo = ra.cargo or {} -- Initialize the cargo subkey if necessary + ra.cargo = ra.cargo or {} ra.cargo.target = target client.notify('workspace/didChangeConfiguration', { settings = client.config.settings }) vim.schedule(function()