Skip to content

Commit

Permalink
Update lua/rustaceanvim/lsp/init.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Nov 25, 2024
1 parent 85384f2 commit e7f76df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lua/rustaceanvim/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e7f76df

Please sign in to comment.