From 01cb4d8846689fef80e869b8099099104b6982c9 Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Mon, 3 Jan 2022 20:36:27 -0500 Subject: [PATCH] fix(lsp): explicitly pass bufnr in didSave handler Addresses a regression introduced by the stricter type checking in lua api functions from https://github.com/neovim/neovim/pull/16745 (cherry picked from commit 62ae12dc8c1c106dcd981c4c9f528365ab56ddc7) --- runtime/lua/vim/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 8bb9960a1b..cfbabb12a6 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -1131,7 +1131,7 @@ function lsp._text_document_did_save_handler(bufnr) if client.resolved_capabilities.text_document_save then local included_text if client.resolved_capabilities.text_document_save_include_text then - included_text = text() + included_text = text(bufnr) end client.notify('textDocument/didSave', { textDocument = {