fix(lsp): when buffer detach remove buffer from client attached buffers (#20081)

Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
This commit is contained in:
Raphael
2022-09-08 23:09:32 +08:00
committed by GitHub
parent 08602ec1ab
commit 30ca6d23a9
2 changed files with 37 additions and 0 deletions

View File

@@ -1644,6 +1644,7 @@ function lsp.buf_attach_client(bufnr, client_id)
if vim.tbl_get(client.server_capabilities, 'textDocumentSync', 'openClose') then
client.notify('textDocument/didClose', params)
end
client.attached_buffers[bufnr] = nil
end)
util.buf_versions[bufnr] = nil
all_buffer_active_clients[bufnr] = nil