Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lsp): schedule api calls in on_exit #267

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading