Skip to content

Commit 48f4475

Browse files
authored
fix(rust_analyzer): scheduled vim.notify in on_exit of vim.system(#3793)
Fix `E5560: nvim_echo must not be called in a fast event context`
1 parent 2e74354 commit 48f4475

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lsp/rust_analyzer.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ return {
9696

9797
on_dir(cargo_workspace_root or cargo_crate_dir)
9898
else
99-
vim.notify(('[rust_analyzer] cmd failed with code %d: %s\n%s'):format(output.code, cmd, output.stderr))
99+
vim.schedule(function()
100+
vim.notify(('[rust_analyzer] cmd failed with code %d: %s\n%s'):format(output.code, cmd, output.stderr))
101+
end)
100102
end
101103
end)
102104
end,

0 commit comments

Comments
 (0)