From ea6fa81f2f7a16343bc452cf6b72ad5c17b7c16c Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Thu, 5 Oct 2023 18:46:08 -0400 Subject: [PATCH] fixup! fix: send buffer text on textDocument/didSave --- autoload/lsp/buffer.vim | 2 +- autoload/lsp/lspserver.vim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/lsp/buffer.vim b/autoload/lsp/buffer.vim index 7d5696a..01140dd 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) + var has_feature: bool = lspserver.featureEnabled(feature) if has_feature return lspserver endif diff --git a/autoload/lsp/lspserver.vim b/autoload/lsp/lspserver.vim index 236aabd..95108e0 100644 --- a/autoload/lsp/lspserver.vim +++ b/autoload/lsp/lspserver.vim @@ -906,10 +906,10 @@ def DidSaveFile(lspserver: dict, bnr: number): void # Notification: 'textDocument/didSave' # Params: DidSaveTextDocumentParams - var params = {textDocument: {uri: util.LspBufnrToUri(bnr)}} + var params: dict = {textDocument: {uri: util.LspBufnrToUri(bnr)}} if lspserver.caps.textDocumentSync.save.includeText - params.textDocument.text = bnr->getbufline(1, '$')->join("\n") .. "\n" + params.text = bnr->getbufline(1, '$')->join("\n") .. "\n" endif lspserver.sendNotification('textDocument/didSave', params) -- 2.48.1