From 78d58eaf61b361ed9b2849ecc1afc99897c01058 Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Sat, 25 Apr 2020 21:58:35 +0900 Subject: lsp: remove buffer version on buffer_detach (#12029) When we save the buffer, the buffer is detached and attached again. So the client also needs to remove the buffer version once. --- runtime/lua/vim/lsp.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua/vim/lsp.lua') diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index afff4d9900..17135e078c 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -198,6 +198,7 @@ local function text_document_did_open_handler(bufnr, client) } } client.notify('textDocument/didOpen', params) + util.buf_versions[bufnr] = params.textDocument.version end --- LSP client object. @@ -722,6 +723,7 @@ function lsp.buf_attach_client(bufnr, client_id) client.notify('textDocument/didClose', params) end end) + util.buf_versions[bufnr] = nil all_buffer_active_clients[bufnr] = nil end; -- TODO if we know all of the potential clients ahead of time, then we -- cgit