fix(lsp): cancel watchers when closing a client

This commit is contained in:
Lewis Russell
2024-02-07 13:05:33 +00:00
parent bf1e098d97
commit 816b56f878
3 changed files with 13 additions and 1 deletions

View File

@@ -167,5 +167,14 @@ function M.unregister(unreg, ctx)
end
end
--- @param client_id integer
function M.cancel(client_id)
for _, reg_cancels in pairs(cancels[client_id]) do
for _, cancel in pairs(reg_cancels) do
cancel()
end
end
end
return M