From: Mitchell Hanberg Date: Fri, 6 Oct 2023 14:42:34 +0000 (-0400) Subject: fixup! fix: send buffer text on textDocument/didSave X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=0e5a10b524a86b2fcdca53c32c1dc537b4fbe0cf;p=vim-lsp.git fixup! fix: send buffer text on textDocument/didSave --- 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