Skip to content

Commit

Permalink
fix(lsp): schedule api calls in on_exit (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtomjhj authored Mar 1, 2024
1 parent b5342fc commit 001dd49
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/rustaceanvim/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,11 @@ M.start = function(bufnr)
local old_on_exit = lsp_start_config.on_exit
lsp_start_config.on_exit = function(...)
override_apply_text_edits()
commands.delete_rust_lsp_command()
vim.api.nvim_del_augroup_by_id(augroup)
-- on_exit runs in_fast_event
vim.schedule(function()
commands.delete_rust_lsp_command()
vim.api.nvim_del_augroup_by_id(augroup)
end)
if type(old_on_exit) == 'function' then
old_on_exit(...)
end
Expand Down

0 comments on commit 001dd49

Please sign in to comment.