Skip to content

Commit

Permalink
refactor: use vim.cmd.RustLsp to reload workspace on cargo.toml change
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Oct 31, 2023
1 parent 0664cb4 commit d09d787
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/rustaceanvim/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ M.start = function()
if config.tools.reload_workspace_from_cargo_toml then
vim.api.nvim_create_autocmd('BufWritePost', {
pattern = '*/Cargo.toml',
command = 'silent! RustLsp reloadWorkspace',
callback = function()
vim.cmd.RustLsp { 'reloadWorkspace', mods = { silent = true } }
end,
group = augroup,
})
end
Expand Down

0 comments on commit d09d787

Please sign in to comment.