fix(lsp): do not reset buf version when detaching client (#29242)

This commit is contained in:
Ilia Choly 2024-06-10 12:53:08 -04:00 committed by GitHub
parent d9af8c2431
commit 37bf4c572a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -520,7 +520,6 @@ local function buf_detach_client(bufnr, client)
end
client.attached_buffers[bufnr] = nil
util.buf_versions[bufnr] = nil
local namespace = lsp.diagnostic.get_namespace(client.id)
vim.diagnostic.reset(namespace, bufnr)
@ -605,6 +604,7 @@ local function buf_attach(bufnr)
buf_detach_client(bufnr, client)
end
attached_buffers[bufnr] = nil
util.buf_versions[bufnr] = nil
end,
-- TODO if we know all of the potential clients ahead of time, then we