mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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
This commit is contained in:
committed by
GitHub
parent
fa46123998
commit
abcbc5a9f3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user