From 0e5a10b524a86b2fcdca53c32c1dc537b4fbe0cf Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Fri, 6 Oct 2023 10:42:34 -0400 Subject: [PATCH] fixup! fix: send buffer text on textDocument/didSave --- autoload/lsp/buffer.vim | 2 +- autoload/lsp/lspserver.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/lsp/buffer.vim b/autoload/lsp/buffer.vim index 01140dd..7d5696a 100644 --- a/autoload/lsp/buffer.vim +++ b/autoload/lsp/buffer.vim @@ -99,7 +99,7 @@ export def BufLspServerGet(bnr: number, feature: string = null_string): dictget(feature, false) if has_feature return lspserver endif diff --git a/autoload/lsp/lspserver.vim b/autoload/lsp/lspserver.vim index 95108e0..40bc145 100644 --- a/autoload/lsp/lspserver.vim +++ b/autoload/lsp/lspserver.vim @@ -908,7 +908,7 @@ def DidSaveFile(lspserver: dict, bnr: number): void # Params: DidSaveTextDocumentParams var params: dict = {textDocument: {uri: util.LspBufnrToUri(bnr)}} - if lspserver.caps.textDocumentSync.save.includeText + if lspserver.caps.textDocumentSync->get("save", {})->get("includeText", v:false) params.text = bnr->getbufline(1, '$')->join("\n") .. "\n" endif -- 2.48.1