This sends the full buffer text on the textDocument/didSave notification
if the server's sync options specify it.
# Notification: 'textDocument/didSave'
# Params: DidSaveTextDocumentParams
var params = {textDocument: {uri: util.LspBufnrToUri(bnr)}}
- # FIXME: Need to set "params.text" when
- # 'lspserver.caps.textDocumentSync.save.includeText' is set to true.
+
+ if lspserver.caps.textDocumentSync.save.includeText
+ params.textDocument.text = bnr->getbufline(1, '$')->join("\n") .. "\n"
+ endif
+
lspserver.sendNotification('textDocument/didSave', params)
enddef