aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2020-12-20 18:12:39 +0100
committerGitHub <noreply@github.com>2020-12-20 18:12:39 +0100
commitabcbc5a9f346f98591f27eb73bc1c63787779368 (patch)
treecfd5c4042609be01ce9c4046ea39961e6246d35d /runtime/lua/vim
parentfa461239980bd21d54c44d5a42b1904fd82d15b7 (diff)
downloadrneovim-abcbc5a9f346f98591f27eb73bc1c63787779368.tar.gz
rneovim-abcbc5a9f346f98591f27eb73bc1c63787779368.tar.bz2
rneovim-abcbc5a9f346f98591f27eb73bc1c63787779368.zip
lsp: Fix text payload in didSave notification (#13363)
According to the specification[1] the payload must look like this: interface DidSaveTextDocumentParams { /** * The document that was saved. */ textDocument: TextDocumentIdentifier; /** * Optional the content when saved. Depends on the includeText value * when the save notification was requested. */ text?: string; } `text` must be on the same level as `textDocument´. Where `TextDocumentIdentifier` is: interface TextDocumentIdentifier { /** * The text document's URI. */ uri: DocumentUri; } [1]: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/lsp.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index ed31572abb..7c7edf98e7 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -881,8 +881,8 @@ function lsp._text_document_did_save_handler(bufnr)
client.notify('textDocument/didSave', {
textDocument = {
uri = uri;
- text = included_text;
- }
+ };
+ text = included_text;
})
end
end)