From: Mitchell Hanberg Date: Thu, 5 Oct 2023 22:46:08 +0000 (-0400) Subject: fixup! fix: send buffer text on textDocument/didSave X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ea6fa81f2f7a16343bc452cf6b72ad5c17b7c16c;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 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)